summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins/sievemgmt/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-14 12:29:59 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-14 12:29:59 +0000
commit38c2bf2ba44e48d5297c6bdf052c1cdfc50bcb9b (patch)
tree3d869bbcabae04bc9f0d048bac7e6fc467c714e1 /pykolab/plugins/sievemgmt/__init__.py
parent1dd9c6570e4ef2b08523e8545d41c97830459624 (diff)
downloadpykolab-38c2bf2ba44e48d5297c6bdf052c1cdfc50bcb9b.tar.gz
Fix issuing len() on a possible None
Diffstat (limited to 'pykolab/plugins/sievemgmt/__init__.py')
-rw-r--r--pykolab/plugins/sievemgmt/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/plugins/sievemgmt/__init__.py b/pykolab/plugins/sievemgmt/__init__.py
index f341eae..1e22a47 100644
--- a/pykolab/plugins/sievemgmt/__init__.py
+++ b/pykolab/plugins/sievemgmt/__init__.py
@@ -271,7 +271,7 @@ class KolabSievemgmt(object):
mgmt_script.require(required_extension)
if vacation_active:
- if len(vacation_react_domains) > 0:
+ if not vacation_react_domains == None and len(vacation_react_domains) > 0:
mgmt_script.addfilter(
'vacation',
[('envelope', ':domain', ":is", "from", vacation_react_domains)],
@@ -288,7 +288,7 @@ class KolabSievemgmt(object):
]
)
- elif len(vacation_noreact_domains) > 0:
+ elif not vacation_noreact_domains == None and len(vacation_noreact_domains) > 0:
mgmt_script.addfilter(
'vacation',
[('not', ('envelope', ':domain', ":is", "from", vacation_noreact_domains))],