return default
# Do not catch ValueError here, it must be propagated
+ def getlist(self, section, option, default=None, sep=None):
+ value = self.get(section, option)
+ if not value:
+ if default is None:
+ return []
+ return default
+ return value.split(sep)
+
def getpath(self, section, option, default=os.path.curdir):
path = self.get(section, option, default=default)
return os.path.expanduser(os.path.expandvars(path))
orderBy=None, use_filters=False):
if use_filters:
config = get_config()
- lang_filter = config.get('filters', 'lang')
+ lang_filter = config.getlist('filters', 'lang')
deleted_filter = config.getint('filters', 'deleted')
if lang_filter:
if join_expressions is None:
join_expressions = []
lang_conditions = []
- for lang in lang_filter.split():
+ for lang in lang_filter:
lvalues = {'name': lang}
conditions = mk_search_conditions(
Language, search_type, case_sensitive, lvalues)