##// END OF EJS Templates
svn-support: Use shlex to split the reload command for subprocess usage.
Martin Bornhold -
r1016:e68768e9 default
parent child Browse files
Show More
@@ -20,6 +20,7 b''
20
20
21 import logging
21 import logging
22 import os
22 import os
23 import shlex
23
24
24 # Do not use `from rhodecode import events` here, it will be overridden by the
25 # Do not use `from rhodecode import events` here, it will be overridden by the
25 # events module in this package due to pythons import mechanism.
26 # events module in this package due to pythons import mechanism.
@@ -46,11 +47,11 b' def includeme(config):'
46
47
47 # Prepare reload command to pass it to the subprocess module and add a
48 # Prepare reload command to pass it to the subprocess module and add a
48 # subscriber to execute it on configuration changes.
49 # subscriber to execute it on configuration changes.
49 cmd = settings[config_keys.reload_command]
50 reload_cmd = shlex.split(settings[config_keys.reload_command])
50 cmd = cmd.split(' ') if cmd else cmd
51 reload_timeout = settings[config_keys.reload_timeout] or None
51 config.add_subscriber(
52 config_change_subscriber = AsyncSubprocessSubscriber(
52 AsyncSubprocessSubscriber(cmd=cmd, timeout=5),
53 cmd=reload_cmd, timeout=reload_timeout)
53 ModDavSvnConfigChange)
54 config.add_subscriber(config_change_subscriber, ModDavSvnConfigChange)
54
55
55
56
56 def _sanitize_settings_and_apply_defaults(settings):
57 def _sanitize_settings_and_apply_defaults(settings):
General Comments 0
You need to be logged in to leave comments. Login now