Skip to content

Commit

Permalink
fix: handle case where readline init file is missing
Browse files Browse the repository at this point in the history
Ignore the FileNotFoundError. File is optional.
  • Loading branch information
rouilj committed Mar 11, 2024
1 parent fb8f4ed commit 9c93cdc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion roundup/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,12 @@ def interactive(self):

try:
import readline
readline.read_init_file(initfile)
try:
readline.read_init_file(initfile)
except FileNotFoundError:
# file is optional
pass

try:
readline.read_history_file(histfile)
except FileNotFoundError:
Expand Down

0 comments on commit 9c93cdc

Please sign in to comment.