From: david-sarah Date: Sun, 13 Jun 2010 16:43:56 +0000 (-0700) Subject: SFTP: remove a dubious use of 'pragma: no cover'. X-Git-Url: https://git.rkrishnan.org/pf/content/en//%22%22?a=commitdiff_plain;h=a3acb2b7733dcb479876ab04cd994a9861d882c1;p=tahoe-lafs%2Ftahoe-lafs.git SFTP: remove a dubious use of 'pragma: no cover'. --- diff --git a/src/allmydata/frontends/sftpd.py b/src/allmydata/frontends/sftpd.py index e4f906e6..aa113690 100644 --- a/src/allmydata/frontends/sftpd.py +++ b/src/allmydata/frontends/sftpd.py @@ -1134,8 +1134,8 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin): from_direntry = _direntry_for(from_parent, from_childname) to_direntry = _direntry_for(to_parent, to_childname) - if noisy: self.log("from_direntry = %r, to_direntry = %r in %r" % - (from_direntry, to_direntry, request), level=NOISY) + if noisy: self.log("from_direntry = %r, to_direntry = %r, len(all_heisenfiles) = %r, len(self._heisenfiles) = %r in %r" % + (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): 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) def _done(ign): - if noisy: - self.log("done %r\nall_heisenfiles = %r\nself._heisenfiles = %r" % (request, all_heisenfiles, self._heisenfiles), level=OPERATIONAL) - else: # pragma: no cover - self.log("done %r" % (request,), level=OPERATIONAL) + if noisy: self.log("done: len(all_heisenfiles) = %r, len(self._heisenfiles) = %r in %r" % + (len(all_heisenfiles), len(self._heisenfiles), request), level=NOISY) return len(from_files) > 0 d.addBoth(_done) return d