Commit cd6990f4 authored by Tanner Prestegard's avatar Tanner Prestegard
Browse files

Merge branch 'safe_netrc_varargs' into 'master'

Make safe_netrc class compatible with old versions of Python

See merge request !5
parents 46d4dfde 3c4d7805
......@@ -241,7 +241,7 @@ class safe_netrc(netrc):
netrc file in the default location (~/.netrc). This subclass applies the
same access safety checks regardless of the path to the netrc file."""
def _parse(self, file, fp, default_netrc):
def _parse(self, file, fp, *args, **kwargs):
# Copied and adapted from netrc.py from Python 2.7
if os.name == 'posix':
prop = os.fstat(fp.fileno())
......@@ -263,4 +263,4 @@ class safe_netrc(netrc):
"~/.netrc access too permissive: access"
" permissions must restrict access to only"
" the owner", file)
return netrc._parse(self, file, fp, default_netrc)
return netrc._parse(self, file, fp, *args, **kwargs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment