##// END OF EJS Templates
config: Use rhodecode aslist if commas included in list settings otherwise pyramids aslist.
Martin Bornhold -
r604:d8ead9a9 default
parent child Browse files
Show More
@@ -51,6 +51,7 b' from rhodecode.lib.middleware.disable_vc'
51 from rhodecode.lib.middleware.https_fixup import HttpsFixup
51 from rhodecode.lib.middleware.https_fixup import HttpsFixup
52 from rhodecode.lib.middleware.vcs import VCSMiddleware
52 from rhodecode.lib.middleware.vcs import VCSMiddleware
53 from rhodecode.lib.plugins.utils import register_rhodecode_plugin
53 from rhodecode.lib.plugins.utils import register_rhodecode_plugin
54 from rhodecode.lib.utils2 import aslist as rhodecode_aslist
54 from rhodecode.subscribers import scan_repositories_if_enabled
55 from rhodecode.subscribers import scan_repositories_if_enabled
55
56
56
57
@@ -451,10 +452,12 b' def _bool_setting(settings, name, defaul'
451 def _list_setting(settings, name, default):
452 def _list_setting(settings, name, default):
452 raw_value = settings.get(name, default)
453 raw_value = settings.get(name, default)
453
454
454 # Check if we get a setting with the old syntax (comma separated).
455 old_separator = ','
455 if ',' in raw_value:
456 if old_separator in raw_value:
456 raw_value = raw_value.replace(',', ' ')
457 # If we get a comma separated list, pass it to our own function.
457
458 settings[name] = rhodecode_aslist(raw_value, sep=old_separator)
459 else:
460 # Otherwise we assume it uses pyramids space/newline separation.
458 settings[name] = aslist(raw_value)
461 settings[name] = aslist(raw_value)
459
462
460
463
General Comments 0
You need to be logged in to leave comments. Login now