summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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