From e9810a7b1aae15320e58371b657a2f963562834d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 19 Oct 2011 12:37:32 -0400 Subject: Rename progress objects to future objects. --- dimension/dimension.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dimension') 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 -- cgit v1.2.3