Skip to content

Commit 9d00324

Browse files
committed
fix(pmjs): catch exceptions when reading the pmjs_history file
1 parent 4a5cfae commit 9d00324

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pmjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ def repl():
152152
readline.parse_and_bind('set editing-mode emacs')
153153
histfile = os.getenv('PMJS_REPL_HISTORY') or os.path.expanduser('~/.pmjs_history')
154154
if (os.path.exists(histfile)):
155-
readline.read_history_file(histfile)
155+
try:
156+
readline.read_history_file(histfile)
157+
except:
158+
pass
156159

157160
got_sigint = 0
158161
statement = ''

0 commit comments

Comments
 (0)