mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
Fix print torrent info to the console
This commit is contained in:
parent
66eaa4071d
commit
06ecfceb74
1 changed files with 6 additions and 1 deletions
|
@ -162,7 +162,12 @@ class Command(BaseCommand):
|
||||||
self.console.write(s)
|
self.console.write(s)
|
||||||
|
|
||||||
if not status["is_finished"]:
|
if not status["is_finished"]:
|
||||||
pbar = format_progressbar(status["progress"], self.console.screen.cols - (13 + len("%.2f%%" % status["progress"])))
|
if hasattr(self.console, "screen"):
|
||||||
|
cols = self.console.screen.cols
|
||||||
|
else:
|
||||||
|
cols = 80
|
||||||
|
|
||||||
|
pbar = format_progressbar(status["progress"], cols - (13 + len("%.2f%%" % status["progress"])))
|
||||||
s = "{!info!}Progress: {!input!}%.2f%% %s" % (status["progress"], pbar)
|
s = "{!info!}Progress: {!input!}%.2f%% %s" % (status["progress"], pbar)
|
||||||
self.console.write(s)
|
self.console.write(s)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue