Skip to content

Commit

Permalink
fix: flush stdout while waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jul 17, 2024
1 parent ab92703 commit b6041e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions esptool/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,13 @@ def __init__(
if not printed_failure:
print(e)
print("Retrying to open port ", end="")
sys.stdout.flush()
printed_failure = True
else:
if retry_attempts % 9 == 0:
# print a dot every second
print(".", end="")
sys.stdout.flush()
time.sleep(0.1)
retry_attempts += 1
continue
Expand Down

0 comments on commit b6041e6

Please sign in to comment.