summaryrefslogtreecommitdiff
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-26 10:57:33 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-26 10:57:33 (GMT)
commitd71bf4c22beaf3ad5204bab0edcee454881c7084 (patch)
tree0752c7247a70dc5b72cc055bf7ac2a7bde725081 /pykolab/utils.py
parenta0071cf51effbb2c0c65f9f6c6e6c060b22ab9e0 (diff)
downloadpykolab-d71bf4c22beaf3ad5204bab0edcee454881c7084.tar.gz
Strip object's keys with value None
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index f1814c4..f76e28b 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -89,11 +89,15 @@ def normalize(_object):
elif type(_object) == dict:
for key in _object.keys():
if type(_object[key]) == list:
+ if _object[key] == None:
+ continue
if len(_object[key]) == 1:
result[key.lower()] = ''.join(_object[key])
else:
result[key.lower()] = _object[key]
else:
+ if _object[key] == None:
+ continue
# What the heck?
result[key.lower()] = _object[key]