summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 5e62f39..69fd8bd 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -160,16 +160,14 @@ class Pdb(bdb.Bdb, cmd.Cmd):
self.allow_kbdint = False
self.nosigint = nosigint
- # Read $HOME/.pdbrc and ./.pdbrc
+ # Read ~/.pdbrc and ./.pdbrc
self.rcLines = []
if readrc:
- if 'HOME' in os.environ:
- envHome = os.environ['HOME']
- try:
- with open(os.path.join(envHome, ".pdbrc")) as rcFile:
- self.rcLines.extend(rcFile)
- except OSError:
- pass
+ try:
+ with open(os.path.expanduser('~/.pdbrc')) as rcFile:
+ self.rcLines.extend(rcFile)
+ except OSError:
+ pass
try:
with open(".pdbrc") as rcFile:
self.rcLines.extend(rcFile)