fw at alioth.debian.org
2008-Dec-12 19:39 UTC
[Secure-testing-commits] r10680 - lib/python
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))