Skip to content

Commit

Permalink
Fix progress finish for empty sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
xxao committed Dec 2, 2024
1 parent a8ea4ac commit 9e65030
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gress/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Martin Strohalm. All rights reserved.

# set version
version = (0, 4, 0)
version = (0, 4, 1)

# import constants
from .enums import *
Expand Down
4 changes: 4 additions & 0 deletions gress/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ def finish(self, *widgets):
name in curly brackets (e.g. 'Processed: {count} ETA: {eta}').
"""

# start if needed
if self._start_time is None:
self.start(0)

# just write widgets if finished already
if self._finished:
self.write(*widgets, permanent=True)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup, find_packages

# set version
version = "0.4.0"
version = "0.4.1"

# get description
with open("README.md", "r", encoding="utf8") as fh:
Expand Down

0 comments on commit 9e65030

Please sign in to comment.