From d2af21d57d3241b1888f8f7d7c2c878e57da7ee3 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Thu, 15 Sep 2011 15:45:09 +0200 Subject: [PATCH] Simplify testing for 'subscribedonly' setting We only explicitly tested for 'yes' when we have a nice function to get boolean settings which also works with Treu/False/NO, etc... Signed-off-by: Sebastian Spaeth Signed-off-by: Nicolas Sebrecht --- offlineimap/repository/IMAP.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 76d0870..daa31c9 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -280,8 +280,7 @@ class IMAPRepository(BaseRepository): imapobj = self.imapserver.acquireconnection() # check whether to list all folders, or subscribed only listfunction = imapobj.list - if self.config.has_option(self.getsection(), 'subscribedonly'): - if self.getconf('subscribedonly') == "yes": + if self.getconfboolean('subscribedonly', False): listfunction = imapobj.lsub try: listresult = listfunction(directory = self.imapserver.reference)[1]