From 15160e92a4627b27a8f0e6e41962a57a7baaffb5 Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Mon, 19 Jan 2015 15:37:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pym/update/update.py b/pym/update/update.py index 2f1e9f4..1efd4ec 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -531,10 +531,13 @@ class Update(object): """ self.endTask() _print = self.color_print - one = _print("{0}", num) - two = _print("{0}", max_num) - part = _(" ({current} of {maximum})").format(current=one, - maximum=two) + if num and max_num: + one = _print("{0}", num) + two = _print("{0}", max_num) + part = _(" ({current} of {maximum})").format(current=one, + maximum=two) + else: + part = "" _print = _print.foreground(Colors.LIGHT_RED) self.startTask(