fix ui bug caused by percentage calculation
This commit is contained in:
@@ -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"]:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user