summaryrefslogtreecommitdiffstats
path: root/pykolab/cli/sieve/cmd_refresh.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/cli/sieve/cmd_refresh.py
parent1dd9c6570e4ef2b08523e8545d41c97830459624 (diff)
downloadpykolab-38c2bf2ba44e48d5297c6bdf052c1cdfc50bcb9b.tar.gz
Fix issuing len() on a possible None
Diffstat (limited to 'pykolab/cli/sieve/cmd_refresh.py')
-rw-r--r--pykolab/cli/sieve/cmd_refresh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/cli/sieve/cmd_refresh.py b/pykolab/cli/sieve/cmd_refresh.py
index 77eecc5..226fb93 100644
--- a/pykolab/cli/sieve/cmd_refresh.py
+++ b/pykolab/cli/sieve/cmd_refresh.py
@@ -258,7 +258,7 @@ def execute(*args, **kw):
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)],
@@ -275,7 +275,7 @@ def execute(*args, **kw):
]
)
- 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))],