summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-14 23:29:48 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-14 23:29:48 (GMT)
commit752d3f557e95cda98a8b50808cfe2f2d0b8767eb (patch)
treefd7f714690f4acffc2456bfd0dda1a9e96fb6947 /Lib
parent077153e9738466a9b0d3b47eebc648759e130803 (diff)
downloadcpython-752d3f557e95cda98a8b50808cfe2f2d0b8767eb.zip
cpython-752d3f557e95cda98a8b50808cfe2f2d0b8767eb.tar.gz
cpython-752d3f557e95cda98a8b50808cfe2f2d0b8767eb.tar.bz2
- Don't hardcode Unix filename syntax when opening ~/.pdbrc.
- Conform to standard coding style in a few more places.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pdb.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index f4a0c89..697fb88 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -59,20 +59,20 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if os.environ.has_key('HOME'):
envHome = os.environ['HOME']
try:
- rcFile = open (envHome + "/.pdbrc")
+ rcFile = open(os.path.join(envHome, ".pdbrc"))
except IOError:
pass
else:
for line in rcFile.readlines():
- self.rcLines.append (line)
+ self.rcLines.append(line)
rcFile.close()
try:
- rcFile = open ("./.pdbrc")
+ rcFile = open(".pdbrc")
except IOError:
pass
else:
for line in rcFile.readlines():
- self.rcLines.append (line)
+ self.rcLines.append(line)
rcFile.close()
def reset(self):