Accepting request 820886 from devel:languages:python:Factory

OBS-URL: https://build.opensuse.org/request/show/820886
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/shared-python-startup?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2020-07-15 13:06:42 +00:00 committed by Git OBS Bridge
commit 94c0d31369
2 changed files with 10 additions and 0 deletions

View File

@ -15,10 +15,12 @@ historyPath = os.path.expanduser("~/.pyhistory%s" % ver)
# handler for saving history # handler for saving history
def save_history(historyPath=historyPath): def save_history(historyPath=historyPath):
import readline
try: try:
readline.write_history_file(historyPath) readline.write_history_file(historyPath)
except: except:
pass pass
del readline
# read history, if it exists # read history, if it exists

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Jul 14 11:03:14 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Import readline in the save_history handler. Otherwise the call
to readline.write_history_file doesn't work (the readline import
at the beginning of the file is already removed) and is silently
ignored by the exception catcher.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Apr 27 13:18:52 UTC 2020 - Matej Cepl <mcepl@suse.com> Mon Apr 27 13:18:52 UTC 2020 - Matej Cepl <mcepl@suse.com>