summaryrefslogtreecommitdiffstats
path: root/lib
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
commit239cb277ab5063b3097f43c161f3b66b4aaa734a (patch)
tree7100fa20541d4f48e05372129042b1b92f6ec00c /lib
parent25b02704f83a73a8d5e556f6a3d362b23013822f (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')
-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