]> gitweb.fluxo.info Git - ckandumper.git/commitdiff
Close each progress bar after use
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 16 May 2019 20:13:02 +0000 (17:13 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 16 May 2019 20:13:02 +0000 (17:13 -0300)
ckandumper

index ba6dfa0465ee0b5059bb9bc5169acf9da528cf4c..be38965ff6d1c9e1ed890933029ca0b3785c4e06 100755 (executable)
@@ -133,6 +133,9 @@ class DownloadMultiple:
 
         await asyncio.gather(*jobs)
 
+        if hasattr(progress_bar, 'close'):
+            progress_bar.close()
+
     def get(self, filepairs):
         self.stats =  { 'exitstatus': {} }
         loop       = asyncio.get_event_loop()
@@ -336,3 +339,10 @@ if __name__ == "__main__":
     except KeyboardInterrupt as e:
         print(e)
         exit(1)
+    #except RuntimeError as e:
+    #    # Weird tqdm error
+    #    if str(e) == 'Set changed size during iteration':
+    #        pass
+    #    else:
+    #      print(e)
+    #      exit(1)