summaryrefslogtreecommitdiffstats
path: root/pykolab/conf
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-10-28 12:41:35 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-10-28 12:41:35 +0100
commitab86e1e85ea181e2e3082c8f10864a567b7f2b0f (patch)
treeaa80ecf6d5e056e3f47dcd77e232ddd165864cd2 /pykolab/conf
parentf692c2c86d39f5da66922989656488ce03a5e710 (diff)
downloadpykolab-ab86e1e85ea181e2e3082c8f10864a567b7f2b0f.tar.gz
Enhance handling of search mail attributes
Diffstat (limited to 'pykolab/conf')
-rw-r--r--pykolab/conf/__init__.py6
-rw-r--r--pykolab/conf/defaults.py4
2 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/conf/__init__.py b/pykolab/conf/__init__.py
index 7fbfa90..425443f 100644
--- a/pykolab/conf/__init__.py
+++ b/pykolab/conf/__init__.py
@@ -450,8 +450,14 @@ class Conf(object):
untrimmed_values = []
setting = self.get_raw(section, key)
+ if setting == None:
+ return self.defaults.address_search_attrs
+
raw_values = setting.split(',')
+ if raw_values == None:
+ return self.defaults.address_search_attrs
+
for raw_value in raw_values:
untrimmed_values.extend(raw_value.split(' '))
diff --git a/pykolab/conf/defaults.py b/pykolab/conf/defaults.py
index 437e3f6..cce57d5 100644
--- a/pykolab/conf/defaults.py
+++ b/pykolab/conf/defaults.py
@@ -25,4 +25,6 @@ class Defaults(object):
# An integer or float to indicate the interval at which the Cyrus IMAP
# library should try to retrieve annotations
- self.cyrus_annotations_retry_interval = 1 \ No newline at end of file
+ self.cyrus_annotations_retry_interval = 1
+
+ self.address_search_attrs = "mail, alias" \ No newline at end of file