* [gentoo-commits] gentoo-x86 commit in app-backup/duplicity/files: duplicity-0.6.21-paramiko-delete.patch
@ 2013-06-17 22:16 Tim Harder (radhermit)
0 siblings, 0 replies; 2+ messages in thread
From: Tim Harder (radhermit) @ 2013-06-17 22:16 UTC (permalink / raw
To: gentoo-commits
radhermit 13/06/17 22:16:40
Added: duplicity-0.6.21-paramiko-delete.patch
Log:
Revbump, apply patch to fix delete with paramiko backend (bug #466734, patch by Andreas Nüßlein).
(Portage version: 2.2.0_alpha180/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Revision Changes Path
1.1 app-backup/duplicity/files/duplicity-0.6.21-paramiko-delete.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/duplicity/files/duplicity-0.6.21-paramiko-delete.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/duplicity/files/duplicity-0.6.21-paramiko-delete.patch?rev=1.1&content-type=text/plain
Index: duplicity-0.6.21-paramiko-delete.patch
===================================================================
Fix the delete function of the paramiko backend (bug #466734).
--- duplicity/backends/_ssh_paramiko.py
+++ duplicity/backends/_ssh_paramiko.py
@@ -363,12 +363,10 @@
def delete(self, filename_list):
"""deletes all files in the list on the remote side. In scp mode unavoidable quoting issues
will cause failures if filenames containing single quotes are encountered."""
- for n in range(1, globals.num_retries+1):
- if n > 1:
- # sleep before retry
- time.sleep(self.retry_delay)
- try:
- for fn in filename_list:
+ for fn in filename_list:
+ # Try to delete each file several times before giving up completely.
+ for n in range(1, globals.num_retries+1):
+ try:
if (globals.use_scp):
self.runremote("rm '%s/%s'" % (self.remote_dir,fn),False,"scp rm ")
else:
@@ -376,11 +374,15 @@
self.sftp.remove(fn)
except Exception, e:
raise BackendException("sftp rm %s failed: %s" % (fn,e))
- except Exception, e:
- 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))
+
+ # If we get here, we deleted this file successfully. Move on to the next one.
+ break
+ except Exception, e:
+ 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))
+ time.sleep(self.retry_delay)
def runremote(self,cmd,ignoreexitcode=False,errorprefix=""):
"""small convenience function that opens a shell channel, runs remote command and returns
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-backup/duplicity/files: duplicity-0.6.21-paramiko-delete.patch
@ 2013-08-29 2:40 Tim Harder (radhermit)
0 siblings, 0 replies; 2+ messages in thread
From: Tim Harder (radhermit) @ 2013-08-29 2:40 UTC (permalink / raw
To: gentoo-commits
radhermit 13/08/29 02:40:40
Removed: duplicity-0.6.21-paramiko-delete.patch
Log:
Version bump and remove old (bug #482846).
(Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-29 2:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 22:16 [gentoo-commits] gentoo-x86 commit in app-backup/duplicity/files: duplicity-0.6.21-paramiko-delete.patch Tim Harder (radhermit)
-- strict thread matches above, loose matches on Subject: below --
2013-08-29 2:40 Tim Harder (radhermit)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox