mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Apply Greg Kochanski's fix for open/265.
This commit is contained in:
parent
dfbd4c7695
commit
5e70cfe22f
1 changed files with 1 additions and 4 deletions
|
@ -8,10 +8,7 @@ class netrc:
|
||||||
def __init__(self, file=None):
|
def __init__(self, file=None):
|
||||||
if not file:
|
if not file:
|
||||||
file = os.path.join(os.environ['HOME'], ".netrc")
|
file = os.path.join(os.environ['HOME'], ".netrc")
|
||||||
try:
|
fp = open(file)
|
||||||
fp = open(file)
|
|
||||||
except:
|
|
||||||
return None
|
|
||||||
self.hosts = {}
|
self.hosts = {}
|
||||||
self.macros = {}
|
self.macros = {}
|
||||||
lexer = shlex.shlex(fp)
|
lexer = shlex.shlex(fp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue