diff --git a/ftp/ftp.py b/ftp/ftp.py index 260a1df..9930614 100644 --- a/ftp/ftp.py +++ b/ftp/ftp.py @@ -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 @@ class ZopeFTPShell(object): 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): diff --git a/ftp/interfaces.py b/ftp/interfaces.py index b482874..5b3571e 100644 --- a/ftp/interfaces.py +++ b/ftp/interfaces.py @@ -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): diff --git a/ftp/publisher.py b/ftp/publisher.py index 37fb683..48cb138 100644 --- a/ftp/publisher.py +++ b/ftp/publisher.py @@ -11,7 +11,9 @@ # FOR A PARTICULAR PURPOSE. # ############################################################################## - +"""Publisher File System Implementation +""" +__docformat__="restructuredtext" import posixpath from cStringIO import StringIO diff --git a/ftp/server.py b/ftp/server.py index 583fffd..5e13095 100644 --- a/ftp/server.py +++ b/ftp/server.py @@ -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 __init__(self, request_factory, logout = None): 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 @@ class FTPFactory(ftp.FTPFactory): 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