Skip to content

Commit

Permalink
reset self._stopped when start() is called
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Nov 19, 2020
1 parent d666956 commit aaa1904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion halo/halo.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ def start(self, text=None):
# to avoid possible overriding in subclasses.
if all(inst._stopped for inst in Halo._instances):
Halo._instances[:] = []
# Allow for calling start() multiple times
if self not in Halo._instances:
# Allow for calling start() multiple times
Halo._instances.append(self)
self._hide_cursor()

Expand All @@ -554,6 +554,7 @@ def start(self, text=None):
self._render_frame()
self._spinner_id = self._spinner_thread.name
self._spinner_thread.start()
self._stopped = False

return self

Expand Down

0 comments on commit aaa1904

Please sign in to comment.