summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Jehannet <julien.jehannet@logilab.fr>2011-03-09 15:35:43 +0100
committerJulien Jehannet <julien.jehannet@logilab.fr>2011-03-09 15:35:43 +0100
commita5f13d728b45a0a53fb78a43bea99921f48cdcc5 (patch)
treeb6c486cd1c1456c9df38810c49492544f8a5eeba
parentf9991cf01612a07446a1542ba4d33ae7b6cf7461 (diff)
downloadlogilab-common-a5f13d728b45a0a53fb78a43bea99921f48cdcc5.tar.gz
[pytest] fix userhome directory expansion
-rw-r--r--debugger.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/debugger.py b/debugger.py
index 8d2bf6e..d4cdeb5 100644
--- a/debugger.py
+++ b/debugger.py
@@ -98,13 +98,15 @@ class Debugger(Pdb):
while tcbk.tb_next is not None:
tcbk = tcbk.tb_next
self._tcbk = tcbk
- self._histfile = osp.join(os.environ["HOME"], ".pdbhist")
+ self._histfile = os.path.expanduser("~/.pdbhist")
def setup_history_file(self):
"""if readline is available, read pdb history file
"""
if readline is not None:
try:
+ # XXX try..except shouldn't be necessary
+ # read_history_file() can accept None
readline.read_history_file(self._histfile)
except IOError:
pass