mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
virtinst: progress: Simplify if-statement
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
parent
a52c282ed3
commit
8ebab1f27e
@ -253,10 +253,8 @@ class TextMeter(BaseMeter):
|
||||
|
||||
# Include text + ui_rate in minimal
|
||||
tl = TerminalLine(8, 8+1+8)
|
||||
if tl._llen > 80:
|
||||
use_hours = True # For big screens, make it more readable.
|
||||
else:
|
||||
use_hours = False
|
||||
# For big screens, make it more readable.
|
||||
use_hours = bool(tl._llen > 80)
|
||||
ui_size = tl.add(' | %5sB' % fread)
|
||||
if self.size is None:
|
||||
ui_time = tl.add(' %s' % format_time(etime, use_hours))
|
||||
@ -301,10 +299,8 @@ class TextMeter(BaseMeter):
|
||||
text = self.basename
|
||||
|
||||
tl = TerminalLine(8)
|
||||
if tl._llen > 80:
|
||||
use_hours = True # For big screens, make it more readable.
|
||||
else:
|
||||
use_hours = False
|
||||
# For big screens, make it more readable.
|
||||
use_hours = bool(tl._llen > 80)
|
||||
ui_size = tl.add(' | %5sB' % total_size)
|
||||
ui_time = tl.add(' %s' % format_time(self.re.elapsed_time(), use_hours))
|
||||
ui_end, not_done = _term_add_end(tl, self.size, amount_read)
|
||||
|
Loading…
Reference in New Issue
Block a user