diff options
author | Julien Jehannet <julien.jehannet@logilab.fr> | 2011-03-09 15:35:43 +0100 |
---|---|---|
committer | Julien Jehannet <julien.jehannet@logilab.fr> | 2011-03-09 15:35:43 +0100 |
commit | a5f13d728b45a0a53fb78a43bea99921f48cdcc5 (patch) | |
tree | b6c486cd1c1456c9df38810c49492544f8a5eeba | |
parent | f9991cf01612a07446a1542ba4d33ae7b6cf7461 (diff) | |
download | logilab-common-a5f13d728b45a0a53fb78a43bea99921f48cdcc5.tar.gz |
[pytest] fix userhome directory expansion
-rw-r--r-- | debugger.py | 4 |
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 |