Permalink
Browse files

Stop if wget is terminated by an signal (e.g. Ctrl-C)

Signed-off-by: Johann Felix Soden <johfel.gmx.de>
Signed-off-by: Stratos Psomadakis <psomas@cslab.ece.ntua.gr>
  • Loading branch information...
1 parent ab8089b commit 9633b8df05a2b8c8bbabf468699c064adf9877d6 @johfel johfel committed with May 18, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 ketchup
View
@@ -288,10 +288,12 @@ def download(url, f):
else:
e = os.system("%s -c -O %s %s" %
(options["wget"], f + ".partial", url))
+ if e & 255:
+ error("wget terminated by signal.")
+ sys.exit(1)
if e:
return None
os.rename(f + ".partial", f)
-
return 1
def verify(url, f, sign):

0 comments on commit 9633b8d

Please sign in to comment.