[Zope-Checkins] CVS: Zope3/lib/python/Zope/Server/FTP - FTPServer.py:1.1.2.7 FTPServerChannel.py:1.1.2.12

Shane Hathaway shane@cvs.zope.org
Fri, 5 Apr 2002 10:01:35 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Server/FTP
In directory cvs.zope.org:/tmp/cvs-serv17395/FTP

Modified Files:
      Tag: Zope3-Server-Branch
	FTPServer.py FTPServerChannel.py 
Log Message:
Fixed line endings again (I hope no one minds me doing this.  I have a tool
that does it automatically :-)


=== Zope3/lib/python/Zope/Server/FTP/FTPServer.py 1.1.2.6 => 1.1.2.7 ===
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-import asyncore
-from FTPServerChannel import FTPServerChannel
-from Zope.Server.ServerBase import ServerBase
-from Zope.Server.Counter import Counter
-
-from Zope.Server.VFS.UnixFileSystem import UnixFileSystem
-from Zope.Server.Authentication.DictionaryAuthentication import \
-     DictionaryAuthentication
-
-
-class FTPServer(ServerBase):
-    """Generic FTP Server"""
-
-    filesystem = UnixFileSystem('/')
-    auth_source = DictionaryAuthentication({'foo': 'bar'})
-
-    channel_class = FTPServerChannel
-    SERVER_IDENT = 'Zope.Server.FTPServer'
-
-
-    def __init__(self, ip, port, task_dispatcher=None, adj=None, start=1,
-                 hit_log=None, verbose=0, socket_map=None):
-        super(FTPServer, self).__init__(ip, port, task_dispatcher,
-                                        adj, start, hit_log,
-                                        verbose, socket_map)
-
-        # statistics
-        self.total_sessions = Counter()
-        self.closed_sessions = Counter()
-        self.total_files_out = Counter()
-        self.total_files_in = Counter()
-        self.total_bytes_out = Counter()
-        self.total_bytes_in = Counter()
-        self.total_exceptions = Counter()
-
-
-if __name__ == '__main__':
-    from Zope.Server.TaskThreads import ThreadedTaskDispatcher
-    td = ThreadedTaskDispatcher()
-    td.setThreadCount(4)
-    FTPServer('', 8021, task_dispatcher=td)
-    try:
-        while 1:
-            asyncore.poll(5)
-            print 'active channels:', FTPServerChannel.active_channels
-    except KeyboardInterrupt:
-        print 'shutting down...'
-        td.shutdown()
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+import asyncore
+from FTPServerChannel import FTPServerChannel
+from Zope.Server.ServerBase import ServerBase
+from Zope.Server.Counter import Counter
+
+from Zope.Server.VFS.UnixFileSystem import UnixFileSystem
+from Zope.Server.Authentication.DictionaryAuthentication import \
+     DictionaryAuthentication
+
+
+class FTPServer(ServerBase):
+    """Generic FTP Server"""
+
+    filesystem = UnixFileSystem('/')
+    auth_source = DictionaryAuthentication({'foo': 'bar'})
+
+    channel_class = FTPServerChannel
+    SERVER_IDENT = 'Zope.Server.FTPServer'
+
+
+    def __init__(self, ip, port, task_dispatcher=None, adj=None, start=1,
+                 hit_log=None, verbose=0, socket_map=None):
+        super(FTPServer, self).__init__(ip, port, task_dispatcher,
+                                        adj, start, hit_log,
+                                        verbose, socket_map)
+
+        # statistics
+        self.total_sessions = Counter()
+        self.closed_sessions = Counter()
+        self.total_files_out = Counter()
+        self.total_files_in = Counter()
+        self.total_bytes_out = Counter()
+        self.total_bytes_in = Counter()
+        self.total_exceptions = Counter()
+
+
+if __name__ == '__main__':
+    from Zope.Server.TaskThreads import ThreadedTaskDispatcher
+    td = ThreadedTaskDispatcher()
+    td.setThreadCount(4)
+    FTPServer('', 8021, task_dispatcher=td)
+    try:
+        while 1:
+            asyncore.poll(5)
+            print 'active channels:', FTPServerChannel.active_channels
+    except KeyboardInterrupt:
+        print 'shutting down...'
+        td.shutdown()


=== Zope3/lib/python/Zope/Server/FTP/FTPServerChannel.py 1.1.2.11 => 1.1.2.12 ===
 
 
-    # List of commands that are always available 
+    # List of commands that are always available
     special_commands = ('cmd_quit', 'cmd_user', 'cmd_pass')
 
     # These are the commands that are accessing the filesystem.