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 <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
fe57140224
commit
d2af21d57d
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user