Skip to content

Commit 51be1a0

Browse files
author
Andreas Maier
committed
Clean out spinner character when done.
Details: - The loop that writes the spinner characters already attempts to have a clean output when the spinner is sopped, by ending with the backslash character. However, there was no flush after the write of the backslash, so that the last spinner character could still be seen. This change adds a flush after the writing of the backslash. Signed-off-by: Andreas Maier <andras.r.maier@gmx.de>
1 parent df4442d commit 51be1a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

click_spinner/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def init_spin(self):
3030
sys.stdout.flush()
3131
time.sleep(0.25)
3232
sys.stdout.write('\b')
33+
sys.stdout.flush()
3334

3435
def __enter__(self):
3536
self.start()

0 commit comments

Comments
 (0)