Skip to content

Commit

Permalink
[fwutil]: Fix UI: enable progressbar render finalizer.
Browse files Browse the repository at this point in the history
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
  • Loading branch information
nazariig committed Jan 2, 2020
1 parent 3182487 commit a98bea4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fwutil/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class URL(object):

def __init__(self, url):
self.__url = url
self.__pb_reset()
self.__pb = None
self.__bytes_num = 0

def __str__(self):
return self.__url
Expand All @@ -69,7 +70,10 @@ def __reporthook(self, count, block_size, total_size):
self.__bytes_num = count * block_size

def __pb_reset(self):
self.__pb = None
if self.__pb:
self.__pb.render_finish()
self.__pb = None

self.__bytes_num = 0

def __validate(self):
Expand Down

0 comments on commit a98bea4

Please sign in to comment.