diff options
Diffstat (limited to 'pyramid/settings.py')
| -rw-r--r-- | pyramid/settings.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pyramid/settings.py b/pyramid/settings.py index de91042eb..11587a8be 100644 --- a/pyramid/settings.py +++ b/pyramid/settings.py @@ -44,8 +44,13 @@ def aslist_cronly(value): value = filter(None, [x.strip() for x in value.splitlines()]) return list(value) -def aslist(value): +def aslist(value, flatten=True): + """ Return a list of strings, separating the input based on newlines + and, if flatten=True (the default), also split on spaces within + each line.""" values = aslist_cronly(value) + if not flatten: + return values result = [] for value in values: subvalues = value.split() |
