Skip to content

Commit

Permalink
Fixing duplicate lines after run. Fixes #92
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Mar 26, 2018
1 parent 5e9c63b commit b012105
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions progressbar/bar.py
Expand Up @@ -71,6 +71,10 @@ def update(self, *args, **kwargs):
def finish(self, *args, **kwargs): # pragma: no cover
end = kwargs.pop('end', '\n')
ProgressBarMixinBase.finish(self, *args, **kwargs)

if self._finished:
return

if end:
self.fd.write(end)
self.fd.flush()
Expand Down

0 comments on commit b012105

Please sign in to comment.