[Zope-Checkins] CVS: Zope/ZServer - FTPServer.py:1.22

Chris McDonough chrism@zope.com
Thu, 21 Mar 2002 13:29:15 -0500


Update of /cvs-repository/Zope/ZServer
In directory cvs.zope.org:/tmp/cvs-serv29850

Modified Files:
	FTPServer.py 
Log Message:
Fixed bug reported on maillist during EWOULDBLOCK when using FTP server (http://
lists.zope.org/pipermail/zope/2002-March/111521.html).



=== Zope/ZServer/FTPServer.py 1.21 => 1.22 ===
 
     def handle_accept (self):
-        conn, addr = self.accept()
+        try:
+            conn, addr = self.accept()
+        except TypeError:
+            # unpack non-sequence as result of accept
+            # returning None (in case of EWOULDBLOCK)
+            return
         self.total_sessions.increment()
         self.log_info('Incoming connection from %s:%d' % (addr[0], addr[1]))
         self.ftp_channel_class (self, conn, addr, self.module)