logmsg("RAISE %r %r" % (request, err.value), level=OPERATIONAL)
try:
if noisy: logmsg(traceback.format_exc(err.value), level=NOISY)
- except:
+ except: # pragma: no cover
pass
# The message argument to SFTPError must not reveal information that
fromPathstring = extensionData[4:(4 + fromPathLen)]
toPathstring = extensionData[(8 + fromPathLen):]
- return self.renameFile(fromPathstring, toPathstring, overwrite=True)
+ d = self.renameFile(fromPathstring, toPathstring, overwrite=True)
+ d.addCallback(lambda ign: "")
+ return d
if extensionName == 'statvfs@openssh.com' or extensionName == 'fstatvfs@openssh.com':
return defer.succeed(struct.pack('>11Q',
def _renameFile(fromPathstring, toPathstring):
extData = (struct.pack('>L', len(fromPathstring)) + fromPathstring +
struct.pack('>L', len(toPathstring)) + toPathstring)
- return self.handler.extendedRequest('posix-rename@openssh.com', extData)
+ d2 = self.handler.extendedRequest('posix-rename@openssh.com', extData)
+ d2.addCallback(lambda res: self.failUnlessReallyEqual(res, ""))
+ return d2
d = self._set_up("renameFile_posix")
d.addCallback(lambda ign: self._set_up_tree())