BitTornado icon indicating copy to clipboard operation
BitTornado copied to clipboard

btmakemetafile fills screen

Open Unit193 opened this issue 7 years ago • 2 comments

Ever since the python 3 port of Bittornado, btmakemetafile now fills the screen rather than simply advancing the progress counter on the same line.

Unit193 avatar Feb 20 '18 23:02 Unit193

Thanks for the report. TBH, I don't have time to work on this, but if you are able to track down the cause and can propose a fix, please feel free to submit a PR.

effigies avatar Feb 20 '18 23:02 effigies

Heh, wow it turns out to be a super simple fix. Note that while this matches the python 2 version, it returns to a prompt without any final message of completeness.

--- a/btmakemetafile.py  2018-02-20 19:47:44.062818141 -0500
+++ b/btmakemetafile.py   2018-02-20 19:49:11.549887461 -0500
@@ -12,7 +12,7 @@
 
 
 def prog(amount):
-    print('%.1f%% complete\r' % (amount * 100))
+    print('%.1f%% complete\r' % (amount * 100, end=""))
 
 
 def main(argv):

Unit193 avatar Feb 21 '18 00:02 Unit193