From f4e43e3d85303236dacfd248910fd72e3a8be594 Mon Sep 17 00:00:00 2001 From: Shawn Davis Date: Tue, 21 Jun 2022 20:39:56 -0500 Subject: [PATCH] Always ensure that a command instance is given a canonical name. --- scripttease/lib/factories.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripttease/lib/factories.py b/scripttease/lib/factories.py index 66db04c..b78aac7 100644 --- a/scripttease/lib/factories.py +++ b/scripttease/lib/factories.py @@ -57,6 +57,7 @@ def command_factory(loader, excluded_kwargs=None, mappings=None, profile=PROFILE command = get_command(_mappings, command_name, *args, locations=loader.locations, **kwargs) if command is not None: + command.name = command_name command.number = number if command.name == "template": @@ -84,7 +85,7 @@ def get_command(mappings, name, *args, locations=None, **kwargs): args and kwargs are passed to the callback. :rtype: scripttease.lib.commands.base.Command | scripttease.lib.commands.base.ItemizedCommand | - scripttease.lib.commands.base.Template + scripttease.lib.commands.base.Template | scripttease.lib.commands.base.MultipleCommands """ # Args need to be mutable.