From fbd52804b9c455de3acebaff5836a56213712e83 Mon Sep 17 00:00:00 2001 From: dbr Date: Sat, 8 Nov 2008 17:57:59 +1030 Subject: [PATCH] Fix progress bar being overwritten with next print statement, remove debug printing of confirmation answer --- autoPathTv.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autoPathTv.py b/autoPathTv.py index 9c8b3b4..98e4cca 100755 --- a/autoPathTv.py +++ b/autoPathTv.py @@ -132,7 +132,7 @@ def copy_with_prog(src_file, dest_file, overwrite = False, block_size = 512): # If it's the end of file if not cur_block: # ..write new line to prevent messing up terminal - sys.stderr.write('\n') + print # print line break to clear progress bar break else: # ..if not, write the block and continue @@ -226,7 +226,6 @@ def confirm(question="Rename files?"): while ans not in ["q", "quit"]: print "y/n/a/q?", ans = raw_input() - print ans if ans.lower() in ["y", "yes"]: return True elif ans.lower() in ["n", "no"]: