[Zope3-checkins] SVN: Zope3/trunk/src/zope/server/ftp/server.py Fixed misspellings that broke PORT mode.

Shane Hathaway shane at zope.com
Wed Sep 29 20:39:46 EDT 2004


Log message for revision 27710:
  Fixed misspellings that broke PORT mode.
  
  Also fixed a bare except (how'd that get through?) and added a couple of 
  comments.
  


Changed:
  U   Zope3/trunk/src/zope/server/ftp/server.py


-=-
Modified: Zope3/trunk/src/zope/server/ftp/server.py
===================================================================
--- Zope3/trunk/src/zope/server/ftp/server.py	2004-09-29 21:31:07 UTC (rev 27709)
+++ Zope3/trunk/src/zope/server/ftp/server.py	2004-09-30 00:39:46 UTC (rev 27710)
@@ -765,7 +765,7 @@
         #if bind_local_minus_one:
         #    self.bind(('', self.control_channel.server.port - 1))
         try:
-            self.sock.connect(self.client_addr)
+            self.connect(client_addr)
         except socket.error:
             self.report('NO_DATA_CONN')
 
@@ -875,8 +875,11 @@
 
 
 class RETRChannel(FTPDataChannel):
-    """Channel for downloading one file from server to client"""
+    """Channel for downloading one file from server to client
 
+    Also used for directory listings.
+    """
+
     opened = 0
     _fileno = None  # provide a default for asyncore.dispatcher._fileno
 
@@ -901,10 +904,10 @@
         return not self.connected
 
     def handle_read(self):
-        # This is only called when making the connection.
+        # This may be called upon making the connection.
         try:
             self.recv(1)
-        except:
+        except socket.error:
             # The connection failed.
             self.report('NO_DATA_CONN')
             self.close()



More information about the Zope3-Checkins mailing list