Skip to content

Commit

Permalink
fix: Only Loop When Commanded To
Browse files Browse the repository at this point in the history
  • Loading branch information
srhinos committed Jul 22, 2022
1 parent 2b0f2c5 commit 5e8bb37
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions primelooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,16 +425,17 @@ def read_cookiefile(path: str) -> typing.List[Cookie]:
traceback.print_tb(ex.__traceback__)
time.sleep(60)
else:
handler.terminator = "\r"
if arg["loop"]:
handler.terminator = "\r"

sleep_time = 60 * 60 * 24
for time_slept in range(sleep_time):
m, s = divmod(sleep_time - time_slept, 60)
h, m = divmod(m, 60)
log.info(f"{h:d}:{m:02d}:{s:02d} till next run...")
time.sleep(1)
sleep_time = 60 * 60 * 24
for time_slept in range(sleep_time):
m, s = divmod(sleep_time - time_slept, 60)
h, m = divmod(m, 60)
log.info(f"{h:d}:{m:02d}:{s:02d} till next run...")
time.sleep(1)

handler.terminator = "\n"
handler.terminator = "\n"

if not arg["loop"]:
break

0 comments on commit 5e8bb37

Please sign in to comment.