]> code.delx.au - youtube-cgi/commitdiff
fixed CLI download
authorJames Bunton <jamesbunton@delx.net.au>
Sat, 13 Oct 2012 22:36:36 +0000 (09:36 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Sat, 13 Oct 2012 22:36:36 +0000 (09:36 +1100)
youtube.cgi

index 5e612d4084dd1f22ccc5d884dffefdd0ef2ec7f5..8b103bee7847de97bbaa5ae68350d6c98e358e76 100755 (executable)
@@ -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()