- fix pythonstart failing on $HOME-less users (bnc#804978)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=134
This commit is contained in:
Jan Matejek 2013-02-25 17:25:43 +00:00 committed by Git OBS Bridge
parent 5be43c0452
commit 3cab334005
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Feb 25 17:24:52 UTC 2013 - jmatejek@suse.com
- fix pythonstart failing on $HOME-less users (bnc#804978)
-------------------------------------------------------------------
Sun Aug 12 11:46:22 UTC 2012 - idonmez@suse.com

View File

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