[Zope3-checkins] SVN: Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/ Cleaned up some minor code style glitches.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Apr 26 12:42:22 EDT 2005


Log message for revision 30185:
  Cleaned up some minor code style glitches.
  

Changed:
  U   Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/ftp.py
  U   Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/interfaces.py
  U   Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/publisher.py
  U   Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/server.py

-=-
Modified: Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/ftp.py
===================================================================
--- Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/ftp.py	2005-04-26 13:59:31 UTC (rev 30184)
+++ Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/ftp.py	2005-04-26 16:42:21 UTC (rev 30185)
@@ -11,9 +11,9 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-
 """This module defines all the FTP shell classes
 """
+__docformat__="restructuredtext"
 
 ## cStringIO is causing me problems with unicode charactors.
 from cStringIO import StringIO
@@ -90,7 +90,8 @@
     implements(ftp.IFTPShell)
 
     def __init__(self, username, password, request_factory):
-        self.fs_access = PublisherFileSystem((username, password), request_factory)
+        self.fs_access = PublisherFileSystem((username, password),
+                                             request_factory)
         self._dir = '/'
 
     def mapCPathToSPath(self, path):

Modified: Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/interfaces.py
===================================================================
--- Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/interfaces.py	2005-04-26 13:59:31 UTC (rev 30184)
+++ Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/interfaces.py	2005-04-26 16:42:21 UTC (rev 30185)
@@ -11,7 +11,9 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-
+"""Interfaces related to the FTP server and Publisher
+"""
+__docformat__="restructuredtext"
 from zope.interface import Interface
 
 class IFileSystem(Interface):

Modified: Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/publisher.py
===================================================================
--- Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/publisher.py	2005-04-26 13:59:31 UTC (rev 30184)
+++ Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/publisher.py	2005-04-26 16:42:21 UTC (rev 30185)
@@ -11,7 +11,9 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-
+"""Publisher File System Implementation
+"""
+__docformat__="restructuredtext"
 import posixpath
 from cStringIO import StringIO
 

Modified: Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/server.py
===================================================================
--- Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/server.py	2005-04-26 13:59:31 UTC (rev 30184)
+++ Zope3/branches/srichter-twisted-integration/src/zope/app/server/ftp/server.py	2005-04-26 16:42:21 UTC (rev 30185)
@@ -11,6 +11,9 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
+"""Twisted-based FTP server for Zope's Publisher.
+"""
+__docformat__="restructuredtext"
 
 from zope.interface import implements
 
@@ -49,10 +52,12 @@
 
     def requestAvatar(self, avatarId, mind, *interfaces):
         if ftp.IFTPShell in interfaces:
-            avatar = ZopeFTPShell(avatarId.username, avatarId.password, self.request_factory)
+            avatar = ZopeFTPShell(avatarId.username, avatarId.password,
+                                  self.request_factory)
             avatar.logout = self.logout
             return ftp.IFTPShell, avatar, avatar.logout
-        raise NotImplementedError("Only IFTPShell interface is supported by this realm")
+        raise NotImplementedError, \
+                  "Only IFTPShell interface is supported by this realm")
 
 class FTPFactory(ftp.FTPFactory):
     allowAnonymous = False
@@ -60,7 +65,8 @@
     def __init__(self, request_factory):
         r = FTPRealm(request_factory)
         p = portal.Portal(r)
-        p.registerChecker(ZopeSimpleAuthenticatation(), credentials.IUsernamePassword)
+        p.registerChecker(ZopeSimpleAuthenticatation(),
+                          credentials.IUsernamePassword)
 
         self.portal = p
 



More information about the Zope3-Checkins mailing list