Skip to content

Commit d832c9c

Browse files
committed
fix: catch exception if history file fails to load for any reason
1 parent 5081c89 commit d832c9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gptme/init.py

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def _load_readline_history() -> None: # pragma: no cover
107107
except FileNotFoundError:
108108
for line in history_examples:
109109
readline.add_history(line)
110+
except:
111+
logger.exception("Failed to load history file")
110112

111113
atexit.register(readline.write_history_file, history_file)
112114

0 commit comments

Comments
 (0)