SFTP: fix error in SFTPUserHandler arguments introduced by execCommand patch.

This commit is contained in:
david-sarah 2010-05-15 18:40:45 -07:00
parent 8028bf01bc
commit 31994aaf74
2 changed files with 3 additions and 5 deletions

View File

@ -805,11 +805,10 @@ class Reason:
class SFTPUserHandler(ConchUser, PrefixingLogMixin):
implements(ISFTPServer, ISession)
def __init__(self, check_abort, client, rootnode, username):
def __init__(self, client, rootnode, username):
ConchUser.__init__(self)
PrefixingLogMixin.__init__(self, facility="tahoe.sftp")
if noisy: self.log(".__init__(%r, %r, %r, %r)" %
(check_abort, client, rootnode, username), level=NOISY)
if noisy: self.log(".__init__(%r, %r, %r)" % (client, rootnode, username), level=NOISY)
self.channelLookup["session"] = session.SSHSession
self.subsystemLookup["sftp"] = FileTransferServer

View File

@ -90,7 +90,6 @@ class Handler(GridTestMixin, ShouldFailMixin, unittest.TestCase):
self.basedir = "sftp/" + basedir
self.set_up_grid(num_clients=num_clients, num_servers=num_servers)
self.check_abort = lambda: False
self.client = self.g.clients[0]
self.username = "alice"
@ -98,7 +97,7 @@ class Handler(GridTestMixin, ShouldFailMixin, unittest.TestCase):
def _created_root(node):
self.root = node
self.root_uri = node.get_uri()
self.handler = sftpd.SFTPUserHandler(self.check_abort, self.client, self.root, self.username)
self.handler = sftpd.SFTPUserHandler(self.client, self.root, self.username)
d.addCallback(_created_root)
return d