Skip to content

Commit

Permalink
tidy close logic
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jan 26, 2020
1 parent 866b3cd commit 2a4c308
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions dvc/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,10 @@ def update_to(self, current, total=None):
def close(self):
if self.desc_persist is not None:
self.set_description_str(self.desc_persist, refresh=False)
for fmt in [
"<??:??", # unknown ETA
"<{remaining}", # 00:00 ETA
]:
self.bar_format = self.bar_format.replace(fmt, "")
for fmt in [
"|{bar:10}|", # completed progressbar
]:
self.bar_format = self.bar_format.replace(fmt, " ")
# unknown/zero ETA
self.bar_format = self.bar_format.replace("<{remaining}", "")
# remove completed bar
self.bar_format = self.bar_format.replace("|{bar:10}|", " ")
super().close()

@property
Expand Down

0 comments on commit 2a4c308

Please sign in to comment.