From 3028648e8f03f2e7d49b980ef08c0d20e0162457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 8 Jan 2012 19:57:03 +0100 Subject: [PATCH] Don't fail if /etc/netrc is not readable --- offlineimap/repository/IMAP.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index a5ed84c..c2633dc 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -138,7 +138,7 @@ class IMAPRepository(BaseRepository): try: netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost()) except IOError, inst: - if inst.errno != errno.ENOENT: + if inst.errno not in (errno.ENOENT, errno.EACCES): raise else: if netrcentry: @@ -235,7 +235,7 @@ class IMAPRepository(BaseRepository): try: netrcentry = netrc.netrc('/etc/netrc').authenticators(self.gethost()) except IOError, inst: - if inst.errno != errno.ENOENT: + if inst.errno not in (errno.ENOENT, errno.EACCES): raise else: if netrcentry: