summaryrefslogtreecommitdiffstats
path: root/lib/python/debian_support.py
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2008-12-12 19:39:29 +0000
committerFlorian Weimer <fw@deneb.enyo.de>2008-12-12 19:39:29 +0000
commitd3876dc69104e9fc086b5d6bfa11bceac2b5081f (patch)
treedf0f59c6454597ab175c7113eea525780cf0a909 /lib/python/debian_support.py
parent5259c7d01ef5bf7e8bed5926141dd9dfc2ef818f (diff)
lib/python/debian_support.py: Handle failure to download patches
If the data is inconsistent, use a non-diffed download. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@10680 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/debian_support.py')
-rw-r--r--lib/python/debian_support.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/debian_support.py b/lib/python/debian_support.py
index 4c1f758888..ca1b325a56 100644
--- a/lib/python/debian_support.py
+++ b/lib/python/debian_support.py
@@ -377,8 +377,11 @@ def updateFile(remote, local, verbose=None):
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))

© 2014-2024 Faster IT GmbH | imprint | privacy policy