From 24a88db595e277a75adda210cae9808a0db64f81 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sun, 12 Jul 2020 09:22:06 -0400 Subject: [PATCH] console fix --- lbry/console.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lbry/console.py b/lbry/console.py index 86b68e081..669fb7c9a 100644 --- a/lbry/console.py +++ b/lbry/console.py @@ -390,8 +390,10 @@ class Advanced(Basic): else: if d['done'][0] != -1: main_bar_name = f"{name[:name.rindex('.')]}.main" - last = (bar.last_print_n,) if len(d['done']) == 1 else (bar.last_print_n, bar.last_print_n2) - diff = tuple(a-b for a, b in zip(d['done'], last)) + if len(d['done']) > 1: + diff = tuple(a-b for a, b in zip(d['done'], (bar.last_print_n, bar.last_print_n2))) + else: + diff = d['done'][0] - bar.last_print_n if main_bar_name != name: main_bar = self.bars.get(main_bar_name) if main_bar.unit == bar.unit: