From ad6c773193e122e78026e48ae9d0820ec2a4209a Mon Sep 17 00:00:00 2001 From: Shawn Davis Date: Sun, 26 Nov 2023 17:21:12 -0600 Subject: [PATCH] Updated base loader to accept space separated lists. --- scripttease/lib/commands/base.py | 13 +++++++++++++ scripttease/lib/loaders/base.py | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/scripttease/lib/commands/base.py b/scripttease/lib/commands/base.py index 7a44db3..43328cf 100644 --- a/scripttease/lib/commands/base.py +++ b/scripttease/lib/commands/base.py @@ -791,3 +791,16 @@ class Template(object): def is_itemized(self): # return "$item" in self.target return False + +''' +class UnsupportedCommand(Command): + """A command class that may be used when a command is not supported on the target operating system.""" + + def __init__(self, statement, **kwargs): + """Initialize the command.""" + self._original_statement = statement + super().__init__(statement, **kwargs) + + def get_statement(self, cd=True, include_comment=True, include_register=True, include_stop=True): + return "The %s command is not supported by the target operating system: %s" +''' diff --git a/scripttease/lib/loaders/base.py b/scripttease/lib/loaders/base.py index 8823f56..81cb8ba 100644 --- a/scripttease/lib/loaders/base.py +++ b/scripttease/lib/loaders/base.py @@ -221,7 +221,7 @@ class BaseLoader(File): if type(value) in (list, tuple): _value = value else: - _value = split_csv(value) + _value = split_csv(value) if "," in value else split_csv(value, separator=" ") elif key in ("func", "function"): _key = "function" _value = value @@ -230,19 +230,19 @@ class BaseLoader(File): if type(value) in (list, tuple): _value = value else: - _value = split_csv(value) + _value = split_csv(value) if "," in value else split_csv(value, separator=" ") elif key == "items": _key = "items" if type(value) in (list, tuple): _value = value else: - _value = split_csv(value) + _value = split_csv(value) if "," in value else split_csv(value, separator=" ") elif key == "tags": _key = "tags" if type(value) in (list, tuple): _value = value else: - _value = split_csv(value) + _value = split_csv(value) if "," in value else split_csv(value, separator=" ") else: _key = key _value = smart_cast(value)