From 0872bf6ff47e5817a748dfcf4c8acaa077f29801 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sun, 14 Oct 2012 09:36:36 +1100 Subject: [PATCH] fixed CLI download --- youtube.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube.cgi b/youtube.cgi index 5e612d4..8b103be 100755 --- a/youtube.cgi +++ b/youtube.cgi @@ -298,7 +298,7 @@ def main(): try: copy_with_progress(content_length, video_data, outfile) - except IOError: + except IOError, e: print video_data.close() @@ -308,7 +308,8 @@ def main(): if old_offset == offset: time.sleep(1) print "Restarting download from", pp_size(offset) - continue + else: + break outfile.close() -- 2.39.2