mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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):
|
||||
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…
Add table
Add a link
Reference in a new issue