Apply Greg Kochanski's fix for open/265.

This commit is contained in:
Eric S. Raymond 2000-07-13 13:25:07 +00:00
parent dfbd4c7695
commit 5e70cfe22f
1 changed files with 1 additions and 4 deletions

View File

@ -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)