Commit 752d3f55 authored by Guido van Rossum's avatar Guido van Rossum

- Don't hardcode Unix filename syntax when opening ~/.pdbrc.

- Conform to standard coding style in a few more places.
parent 077153e9
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment