Don't fail if /etc/netrc is not readable
This commit is contained in:
parent
b5a13157e4
commit
0b103e8627
@ -138,7 +138,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
try:
|
try:
|
||||||
netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost())
|
netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost())
|
||||||
except IOError, inst:
|
except IOError, inst:
|
||||||
if inst.errno != errno.ENOENT:
|
if inst.errno not in (errno.ENOENT, errno.EACCES):
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
if netrcentry:
|
if netrcentry:
|
||||||
@ -235,7 +235,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
try:
|
try:
|
||||||
netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost())
|
netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost())
|
||||||
except IOError, inst:
|
except IOError, inst:
|
||||||
if inst.errno != errno.ENOENT:
|
if inst.errno not in (errno.ENOENT, errno.EACCES):
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
if netrcentry:
|
if netrcentry:
|
||||||
|
Loading…
Reference in New Issue
Block a user