diff --git a/moulinette/actionsmap.py b/moulinette/actionsmap.py index 6b182ca8..12514f18 100644 --- a/moulinette/actionsmap.py +++ b/moulinette/actionsmap.py @@ -593,7 +593,7 @@ class ActionsMap(object): # * namespace define the top "name", for us it will always be # "yunohost" and there well be only this one # * actionsmap is the actual actionsmap that we care about - for namespace, actionsmap in list(actionsmaps.items()): + for namespace, actionsmap in actionsmaps.items(): # Retrieve global parameters _global = actionsmap.pop('_global', {}) diff --git a/moulinette/interfaces/cli.py b/moulinette/interfaces/cli.py index ee92b2d7..19c048da 100644 --- a/moulinette/interfaces/cli.py +++ b/moulinette/interfaces/cli.py @@ -315,6 +315,8 @@ class ActionsMapParser(BaseActionsMapParser): deprecated_alias=deprecated_alias) def add_global_arguments(self, arguments): + if not arguments: + return for argument_name, argument_options in arguments.items(): # will adapt arguments name for cli or api context names = self.format_arg_names(str(argument_name),