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()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
# check whether to list all folders, or subscribed only
|
# check whether to list all folders, or subscribed only
|
||||||
listfunction = imapobj.list
|
listfunction = imapobj.list
|
||||||
if self.config.has_option(self.getsection(), 'subscribedonly'):
|
if self.getconfboolean('subscribedonly', False):
|
||||||
if self.getconf('subscribedonly') == "yes":
|
|
||||||
listfunction = imapobj.lsub
|
listfunction = imapobj.lsub
|
||||||
try:
|
try:
|
||||||
listresult = listfunction(directory = self.imapserver.reference)[1]
|
listresult = listfunction(directory = self.imapserver.reference)[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user