Updated base loader to accept space separated lists.

development
Shawn Davis 1 year ago
parent 20866e78ed
commit ad6c773193
  1. 13
      scripttease/lib/commands/base.py
  2. 8
      scripttease/lib/loaders/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"
'''

@ -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)

Loading…
Cancel
Save