This commit is contained in:
holomorph 2017-04-16 22:06:59 +00:00 committed by GitHub
commit 08bf6e4f7e
1 changed files with 8 additions and 0 deletions

View File

@ -202,6 +202,14 @@ class IMAPRepository(BaseRepository):
if netrcentry:
return netrcentry[0]
try:
netrcentry = netrc.netrc().authenticators(self.gethost())
except IOError as inst:
if inst.errno not in (errno.ENOENT, errno.EACCES):
raise
else:
if netrcentry:
return netrcentry[0]
try:
netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost())
except IOError as inst: