Commit 9b218b67 authored by Sriram Karra's avatar Sriram Karra

Defensive check in case netrc could not be read at all.

(cherry picked from commit afac4b01f640bd267af761a58a1ad1e1015e1a8d)
parent 106530e7
......@@ -60,6 +60,9 @@ class NetrcAuth:
how to use the coll_n parameter and should expect that parameter to be
ignored if that suits the netrc data!"""
if self.netrc is None:
return None, None
tries = ['%s%s_%s' % (dbid, coll_n, pname), '%s_%s' % (dbid, pname)]
for mach in tries:
res = self.netrc.authenticators(mach)
......
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