fix ui bug caused by percentage calculation

This commit is contained in:
Safa Arıman
2019-08-20 23:21:19 +03:00
parent fef6c131d0
commit c71327fbc0
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -170,7 +170,6 @@ class CLI(pisi.ui.UI):
if no_expr.search(s):
return False
def display_progress(self, **ka):
""" display progress of any operation """
if ka['operation'] in ["removing", "rebuilding-db"]:
+2
View File
@@ -64,6 +64,8 @@ class FetchHandler:
self.size = blocknum * bs + self.exist_size
if self.total_size:
self.percent = self.size * 100 / self.total_size
if self.percent > 100:
self.percent = 100
else:
self.percent = 0