diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-10-19 12:37:32 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-10-19 14:19:43 -0400 |
commit | e9810a7b1aae15320e58371b657a2f963562834d (patch) | |
tree | c74c37b635d7c35773d9b9b57e579763ff946300 /dimension | |
parent | b14a87691f42be83691861b97a2f410c25c9c4bb (diff) | |
download | dimension-e9810a7b1aae15320e58371b657a2f963562834d.tar.xz |
Rename progress objects to future objects.
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/dimension.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dimension/dimension.in b/dimension/dimension.in index dc2430c..0ea41e4 100644 --- a/dimension/dimension.in +++ b/dimension/dimension.in @@ -119,7 +119,7 @@ if args.output is None: args.output = noext + ".png" # Display a progress bar -def progress_bar(str, progress): +def progress_bar(str, future): try: if not args.quiet: print(str, end = " ") @@ -128,21 +128,21 @@ def progress_bar(str, progress): term_width = terminal_width() width = term_width - (len(str) + 1)%term_width for i in range(width): - progress.wait((i + 1)/width) + future.wait((i + 1)/width) print(".", end = "") sys.stdout.flush() print() sys.stdout.flush() - progress.finish() + future.join() except KeyboardInterrupt: print() sys.stdout.flush() - progress.cancel() + future.cancel() try: - progress.finish() + future.join() except RuntimeError: # Swallow the failure exception pass |