1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-24 07:01:59 +00:00

Compatibility with python 3.4

This commit is contained in:
Abogical 2016-11-14 00:05:42 +02:00
parent b737866905
commit 467fe38b15

View file

@ -1258,13 +1258,13 @@ def show(self, current=None, increase=1, info=[]):
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)