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

- Conform to standard coding style in a few more places.
This commit is contained in:
Guido van Rossum 2001-01-14 23:29:48 +00:00
parent 077153e973
commit 752d3f557e
1 changed files with 4 additions and 4 deletions

View File

@ -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):