Skip to content

Commit

Permalink
PixivUtil2.py: Handle EOFError in main_loop (Nandaka#1326)
Browse files Browse the repository at this point in the history
Sending an EOF to an application asking for input is a common way to tell it you're done on *nix.
  • Loading branch information
SimonPilkington authored Mar 7, 2024
1 parent 9a9ed16 commit d0bfaae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PixivUtil2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,9 @@ def main_loop(ewd, op_is_valid, selection, np_is_valid_local, args, options):
PixivHelper.clearScreen()
print("Restarting...")
selection = menu()
except EOFError:
selection = 'x'
break
except PixivException as ex:
if ex.htmlPage is not None:
filename = f"Dump for {PixivHelper.sanitize_filename(ex.value)}.html"
Expand Down

0 comments on commit d0bfaae

Please sign in to comment.