mirror of
https://github.com/python/cpython.git
synced 2025-10-14 10:53:40 +00:00
- Don't hardcode Unix filename syntax when opening ~/.pdbrc.
- Conform to standard coding style in a few more places.
This commit is contained in:
parent
077153e973
commit
752d3f557e
1 changed files with 4 additions and 4 deletions
|
@ -59,7 +59,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
||||||
if os.environ.has_key('HOME'):
|
if os.environ.has_key('HOME'):
|
||||||
envHome = os.environ['HOME']
|
envHome = os.environ['HOME']
|
||||||
try:
|
try:
|
||||||
rcFile = open (envHome + "/.pdbrc")
|
rcFile = open(os.path.join(envHome, ".pdbrc"))
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
@ -67,7 +67,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
||||||
self.rcLines.append(line)
|
self.rcLines.append(line)
|
||||||
rcFile.close()
|
rcFile.close()
|
||||||
try:
|
try:
|
||||||
rcFile = open ("./.pdbrc")
|
rcFile = open(".pdbrc")
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue