Skip to content

Commit

Permalink
fix: replace FileNotFoundError with IOError
Browse files Browse the repository at this point in the history
Python2 doesn't have the FileNotFoundError which is a subclass of
IOError.

So use IOError.
  • Loading branch information
rouilj committed Mar 11, 2024
1 parent 9c93cdc commit 1c76a3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roundup/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2272,13 +2272,13 @@ def interactive(self):
import readline
try:
readline.read_init_file(initfile)
except FileNotFoundError:
except IOError: # FileNotFoundError under python3
# file is optional
pass

try:
readline.read_history_file(histfile)
except FileNotFoundError:
except IOError: # FileNotFoundError under python3
# no history file yet
pass

Expand Down

0 comments on commit 1c76a3e

Please sign in to comment.