[Zope3-checkins] CVS: Zope3/lib/python/Zope/Server/Thread - SelectTrigger.py:1.6
Jeremy Hylton
jeremy@zope.com
Fri, 20 Dec 2002 17:37:29 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Server/Thread
In directory cvs.zope.org:/tmp/cvs-serv3807
Modified Files:
SelectTrigger.py
Log Message:
Convert a few more triggers to Triggers.
Replace default args with lambda exploiting nested scope.
=== Zope3/lib/python/Zope/Server/Thread/SelectTrigger.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/Server/Thread/SelectTrigger.py:1.5 Fri Dec 20 17:35:11 2002
+++ Zope3/lib/python/Zope/Server/Thread/SelectTrigger.py Fri Dec 20 17:37:28 2002
@@ -141,8 +141,8 @@
# tricky: get a pair of connected sockets
for i in range(NPORTS):
- trigger.portoffset = (trigger.portoffset + 1) % NPORTS
- port = MINPORT + trigger.portoffset
+ Trigger.portoffset = (Trigger.portoffset + 1) % NPORTS
+ port = MINPORT + Trigger.portoffset
address = (HOST, port)
try:
a.bind(address)
@@ -226,9 +226,7 @@
self.buffer = self.buffer + data
if len(self.buffer) > self.buffer_size:
d, self.buffer = self.buffer, ''
- the_trigger.pull_trigger (
- lambda d=d,p=self.parent: p.push (d)
- )
+ the_trigger.pull_trigger(lambda: self.parent.push(d))
def writeline (self, line):
self.write(line + '\r\n')