From c0a554ea98606ac697e9fde2afb2a89b081e2775 Mon Sep 17 00:00:00 2001 From: marcsello Date: Wed, 14 Apr 2021 17:48:46 +0200 Subject: [PATCH] Changed name to command --- single_ursim_control/compiler.py | 6 ++++-- single_ursim_control/program_schema.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/single_ursim_control/compiler.py b/single_ursim_control/compiler.py index b3fff5e..07cae31 100644 --- a/single_ursim_control/compiler.py +++ b/single_ursim_control/compiler.py @@ -9,9 +9,11 @@ def compile_program(plugin_repository: PluginRepository, program_source: List[di compiled_program = [] for command_source in program_source: - logger.debug(f"Compiling: [{command_source['name']}],{command_source['args']}") + cmd = command_source['command'] + args = command_source['args'] + logger.debug(f"Compiling: [{cmd}:{args}]") compiled_program.append( - plugin_repository.get_compiler(command_source['name']).compile(**command_source['args']) + plugin_repository.get_compiler(cmd).compile(**args) ) return compiled_program diff --git a/single_ursim_control/program_schema.py b/single_ursim_control/program_schema.py index cf3992a..adc856a 100644 --- a/single_ursim_control/program_schema.py +++ b/single_ursim_control/program_schema.py @@ -6,7 +6,7 @@ SUPPORTED_PROGRAM_STRUCTURE_VERSION = 1 class CommandSchema(Schema): - name = fields.Str(required=True) + command = fields.Str(required=True) args = fields.Dict(required=True) class Meta: