aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-05-16 17:13:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-05-16 17:13:02 -0300
commit4a1c1fea7e6b5083a691e6e4f05a9fc7c0ec9017 (patch)
tree9ac8c584bf436005137ef7c3766e34a52b54c6e1
parent43ccdb6b61707bdc5e53990bd18892d42fb0a54b (diff)
downloadckandumper-4a1c1fea7e6b5083a691e6e4f05a9fc7c0ec9017.tar.gz
ckandumper-4a1c1fea7e6b5083a691e6e4f05a9fc7c0ec9017.tar.bz2
Close each progress bar after use
-rwxr-xr-xckandumper10
1 files changed, 10 insertions, 0 deletions
diff --git a/ckandumper b/ckandumper
index ba6dfa0..be38965 100755
--- a/ckandumper
+++ b/ckandumper
@@ -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)