letsencrypt: Call letsencrypt manage_hooks with correct arguments

The `--modules` argument in letsencrypt toggle_hooks command is passed a list of
plinth modules as a single space-separated string. They should instead be passed
as a sequence of individual arguments.

Fixes #1520

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati 2019-03-27 10:57:16 +05:30 committed by Sunil Mohan Adapa
parent 6c86db132b
commit adaf3d6415
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -156,7 +156,7 @@ def toggle_module(request, domain, module):
le_arguments = ['manage_hooks', 'enable']
if not enabled_modules == []:
le_arguments.extend(['--modules', ' '.join(enabled_modules)])
le_arguments.extend(['--modules'] + enabled_modules)
try:
actions.superuser_run(module, module_args)