Compatibility with python 3.4

This commit is contained in:
Abogical 2016-11-14 00:05:42 +02:00
parent b737866905
commit 467fe38b15
1 changed files with 2 additions and 2 deletions

View File

@ -1258,13 +1258,13 @@ class ProgressIndicatorPercent:
if pct is not None:
# truncate the last argument, if space is available
if info != []:
msg = self.msg % (pct, *info[:-1], '')
msg = self.msg % tuple([pct] + info[:-1] + [''])
space = get_terminal_size()[0] - len(msg)
if space < 8:
info[-1] = ''
else:
info[-1] = ellipsis_truncate(info[-1], space)
return self.output(self.msg % (pct, *info))
return self.output(self.msg % tuple([pct] + info))
return self.output(self.msg % pct)