mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-01 00:45:52 +00:00
SFTP: remove a dubious use of 'pragma: no cover'.
This commit is contained in:
parent
11e88c340a
commit
a3acb2b773
@ -1134,8 +1134,8 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
|
|||||||
from_direntry = _direntry_for(from_parent, from_childname)
|
from_direntry = _direntry_for(from_parent, from_childname)
|
||||||
to_direntry = _direntry_for(to_parent, to_childname)
|
to_direntry = _direntry_for(to_parent, to_childname)
|
||||||
|
|
||||||
if noisy: self.log("from_direntry = %r, to_direntry = %r in %r" %
|
if noisy: self.log("from_direntry = %r, to_direntry = %r, len(all_heisenfiles) = %r, len(self._heisenfiles) = %r in %r" %
|
||||||
(from_direntry, to_direntry, request), level=NOISY)
|
(from_direntry, to_direntry, len(all_heisenfiles), len(self._heisenfiles), request), level=NOISY)
|
||||||
|
|
||||||
if not overwrite and (to_userpath in self._heisenfiles or to_direntry in all_heisenfiles):
|
if not overwrite and (to_userpath in self._heisenfiles or to_direntry in all_heisenfiles):
|
||||||
def _existing(): raise SFTPError(FX_PERMISSION_DENIED, "cannot rename to existing path " + to_userpath)
|
def _existing(): raise SFTPError(FX_PERMISSION_DENIED, "cannot rename to existing path " + to_userpath)
|
||||||
@ -1162,10 +1162,8 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
|
|||||||
d.addBoth(f.sync)
|
d.addBoth(f.sync)
|
||||||
|
|
||||||
def _done(ign):
|
def _done(ign):
|
||||||
if noisy:
|
if noisy: self.log("done: len(all_heisenfiles) = %r, len(self._heisenfiles) = %r in %r" %
|
||||||
self.log("done %r\nall_heisenfiles = %r\nself._heisenfiles = %r" % (request, all_heisenfiles, self._heisenfiles), level=OPERATIONAL)
|
(len(all_heisenfiles), len(self._heisenfiles), request), level=NOISY)
|
||||||
else: # pragma: no cover
|
|
||||||
self.log("done %r" % (request,), level=OPERATIONAL)
|
|
||||||
return len(from_files) > 0
|
return len(from_files) > 0
|
||||||
d.addBoth(_done)
|
d.addBoth(_done)
|
||||||
return d
|
return d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user