mirror of
https://github.com/python/cpython.git
synced 2025-10-14 02:43:49 +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,20 +59,20 @@ 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:
|
||||||
for line in rcFile.readlines():
|
for line in rcFile.readlines():
|
||||||
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:
|
||||||
for line in rcFile.readlines():
|
for line in rcFile.readlines():
|
||||||
self.rcLines.append (line)
|
self.rcLines.append(line)
|
||||||
rcFile.close()
|
rcFile.close()
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue