[Secure-testing-commits] r10680 - lib/python
fw at alioth.debian.org
fw at alioth.debian.org
Fri Dec 12 19:39:29 UTC 2008
Author: fw
Date: 2008-12-12 19:39:29 +0000 (Fri, 12 Dec 2008)
New Revision: 10680
Modified:
lib/python/debian_support.py
Log:
lib/python/debian_support.py: Handle failure to download patches
If the data is inconsistent, use a non-diffed download.
Modified: lib/python/debian_support.py
===================================================================
--- lib/python/debian_support.py 2008-12-11 21:14:12 UTC (rev 10679)
+++ lib/python/debian_support.py 2008-12-12 19:39:29 UTC (rev 10680)
@@ -377,8 +377,11 @@
for patch_name in patches_to_apply:
print "updateFile: downloading patch " + `patch_name`
- patch_contents = downloadGunzipLines(remote + '.diff/' + patch_name
- + '.gz')
+ try:
+ patch_contents = downloadGunzipLines(remote + '.diff/' + patch_name
+ + '.gz')
+ except IOError, e:
+ return downloadFile(remote, local)
if readLinesSHA1(patch_contents ) <> patch_hashes[patch_name]:
raise ValueError, "patch %s was garbled" % `patch_name`
patchLines(lines, patchesFromEdScript(patch_contents))
More information about the Secure-testing-commits
mailing list