mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Update argument with empty value adding for OrderedDict usage
This commit is contained in:
parent
254e592f5e
commit
a4663764e9
1 changed files with 4 additions and 4 deletions
|
@ -1483,7 +1483,7 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
from yunohost.domain import domain_list
|
from yunohost.domain import domain_list
|
||||||
from yunohost.user import user_info
|
from yunohost.user import user_info
|
||||||
|
|
||||||
args_list = OrderedDict()
|
args_dict = OrderedDict()
|
||||||
try:
|
try:
|
||||||
action_args = manifest['arguments'][action]
|
action_args = manifest['arguments'][action]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -1535,7 +1535,7 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
raise MoulinetteError(errno.EINVAL,
|
raise MoulinetteError(errno.EINVAL,
|
||||||
m18n.n('app_argument_required', name=arg_name))
|
m18n.n('app_argument_required', name=arg_name))
|
||||||
elif not arg_value:
|
elif not arg_value:
|
||||||
args_list.append('')
|
args_dict[arg_name] = ''
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Validate argument choice
|
# Validate argument choice
|
||||||
|
@ -1574,8 +1574,8 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
raise MoulinetteError(errno.EINVAL,
|
raise MoulinetteError(errno.EINVAL,
|
||||||
m18n.n('app_argument_choice_invalid',
|
m18n.n('app_argument_choice_invalid',
|
||||||
name=arg_name, choices='0, 1'))
|
name=arg_name, choices='0, 1'))
|
||||||
args_list[arg_name] = arg_value
|
args_dict[arg_name] = arg_value
|
||||||
return args_list
|
return args_dict
|
||||||
|
|
||||||
def _make_environment_dict(args_dict):
|
def _make_environment_dict(args_dict):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue