From 3cab334005196a5ce39ef68251c2a201eb274daac5661569c15a97ed091cc122 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Mon, 25 Feb 2013 17:25:43 +0000 Subject: [PATCH] - 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 --- python.changes | 5 +++++ pythonstart | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python.changes b/python.changes index ed23be0..6aea52b 100644 --- a/python.changes +++ b/python.changes @@ -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 diff --git a/pythonstart b/pythonstart index e155a31..3802a13 100644 --- a/pythonstart +++ b/pythonstart @@ -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):