[Zope-CVS] CVS: Packages/SFTPGateway/src/sftpgateway -
connector.py:1.30
Fred L. Drake, Jr.
fred at zope.com
Mon Dec 22 10:24:09 EST 2003
Update of /cvs-repository/Packages/SFTPGateway/src/sftpgateway
In directory cvs.zope.org:/tmp/cvs-serv23220
Modified Files:
connector.py
Log Message:
add an error handler for opening a directory
=== Packages/SFTPGateway/src/sftpgateway/connector.py 1.29 => 1.30 ===
--- Packages/SFTPGateway/src/sftpgateway/connector.py:1.29 Sun Dec 21 10:46:59 2003
+++ Packages/SFTPGateway/src/sftpgateway/connector.py Mon Dec 22 10:24:09 2003
@@ -108,6 +108,7 @@
errcode, errmsg = error.value.args[0][0].split(None, 1)
self._app.debug("error: %s %s", errcode, errmsg)
if errcode in ("530", "532", "550"):
+ self._app.debug("converting to OSError, errno=EACCES")
raise OSError(errno.EACCES, errmsg, path)
return error
@@ -168,7 +169,8 @@
def _openDirectory(self, ftpClient, path):
protocol = DirectoryListProtocol(self, path)
d = ftpClient.list(path, protocol)
- d.addCallback(protocol.return_all)
+ d.addCallbacks(protocol.return_all, self.checkErrors,
+ errbackArgs=(path,))
return d
def getAttrs(self, path, followLinks):
More information about the Zope-CVS
mailing list