mirror of https://github.com/python/cpython
Apply Greg Kochanski's fix for open/265.
This commit is contained in:
parent
dfbd4c7695
commit
5e70cfe22f
|
@ -8,10 +8,7 @@ class netrc:
|
|||
def __init__(self, file=None):
|
||||
if not file:
|
||||
file = os.path.join(os.environ['HOME'], ".netrc")
|
||||
try:
|
||||
fp = open(file)
|
||||
except:
|
||||
return None
|
||||
fp = open(file)
|
||||
self.hosts = {}
|
||||
self.macros = {}
|
||||
lexer = shlex.shlex(fp)
|
||||
|
|
Loading…
Reference in New Issue