Skip to content

Commit

Permalink
jet review
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Jan 13, 2023
1 parent ba6be2b commit d6a609f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AutoROM.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def torrent_tar_to_buffer():
success = False
while not success:
if tries > 2:
raise RuntimeError("Tried to download ROMs 3 time, which have all failed, please try again or report this issue.")
raise RuntimeError("Tried to download ROMs 3 times, which have all failed, please try again or report this issue.")

tries += 1

Expand All @@ -176,13 +176,13 @@ def torrent_tar_to_buffer():

# download roms as long as state is not seeding
timeit = 1
while handle.status().state != 5:
while handle.status().state not in {4, 5}:
# some sleep helps
time.sleep(1)
timeit += 1

if timeit == 20:
print("Terminating attempt to download ROMs, trying again", file=sys.stderr)
print("Terminating attempt to download ROMs after 20 seconds, trying again", file=sys.stderr)
break
elif timeit % 5 == 0:
print(f"time={timeit}/20 seconds - Trying to download atari roms, "
Expand Down

0 comments on commit d6a609f

Please sign in to comment.