duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #01294
[Merge] lp:~mterry/duplicity/1031277 into lp:duplicity
Michael Terry has proposed merging lp:~mterry/duplicity/1031277 into lp:duplicity.
Requested reviews:
duplicity-team (duplicity-team)
Related bugs:
Bug #1031277 in Duplicity: "cleanup broken"
https://bugs.launchpad.net/duplicity/+bug/1031277
For more details, see:
https://code.launchpad.net/~mterry/duplicity/1031277/+merge/125096
--
https://code.launchpad.net/~mterry/duplicity/1031277/+merge/125096
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/1031277 into lp:duplicity.
=== modified file 'duplicity/backends/_ssh_paramiko.py'
--- duplicity/backends/_ssh_paramiko.py 2012-05-16 11:03:20 +0000
+++ duplicity/backends/_ssh_paramiko.py 2012-09-19 05:00:24 +0000
@@ -360,16 +360,16 @@
for fn in filename_list:
if (globals.use_scp):
self.runremote("rm '%s/%s'" % (self.remote_dir,fn),False,"scp rm ")
- return
else:
try:
self.sftp.remove(fn)
- return
except Exception, e:
raise BackendException("sftp rm %s failed: %s" % (fn,e))
except Exception, e:
- log.Warn("%s (Try %d of %d) Will retry in %d seconds." % (e,n,globals.num_retries,self.retry_delay))
- raise BackendException("Giving up trying to delete '%s' after %d attempts" % (", ".join(filename_list),n))
+ if n == globals.num_retries:
+ log.FatalError(str(e), log.ErrorCode.backend_error)
+ else:
+ log.Warn("%s (Try %d of %d) Will retry in %d seconds." % (e,n,globals.num_retries,self.retry_delay))
def runremote(self,cmd,ignoreexitcode=False,errorprefix=""):
"""small convenience function that opens a shell channel, runs remote command and returns
Follow ups