diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-08-01 14:19:45 -0400 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-08-01 14:19:45 -0400 |
commit | ce1429e7f3af6763109301e3b5936e297466a588 (patch) | |
tree | 1503abd701f49b74dfe8fbf76f327c01d5c0909f /bin | |
parent | 835f25790ff6dfed09e2b2b437691008ebd55297 (diff) | |
download | pykolab-ce1429e7f3af6763109301e3b5936e297466a588.tar.gz |
Using len() on an empty result is not useful. Fixes #258
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/kolab_smtp_access_policy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py index 39bd45a..dcd6ed0 100755 --- a/bin/kolab_smtp_access_policy.py +++ b/bin/kolab_smtp_access_policy.py @@ -507,7 +507,7 @@ def verify_recipient(policy_request): ) if not cache == False: - result_set = cache_select( + result = cache_select( sender=policy_request['sender'], recipient=policy_request['recipient'], sasl_username=policy_request['sasl_username'], @@ -515,7 +515,7 @@ def verify_recipient(policy_request): function='verify_recipient' ) - if len(result_set) < 1: + if result == None: record_id = cache_insert( sender=policy_request['sender'], recipient=policy_request['recipient'], |