Fixed issue where a command with no arguments would fail to parse.

development
Shawn Davis 4 years ago
parent 2ad8759147
commit 20399b9348
  1. 2
      VERSION.txt
  2. 14
      scripttease/parsers/ini.py
  3. 6
      scripttease/version.py

@ -1 +1 @@
6.7.0
6.7.1

@ -49,11 +49,15 @@ class Config(Parser):
command_name = key
# Arguments surrounded by quotes are considered to be one argument. All others are split into a
# list to be passed to the callback.
if value[0] == '"':
args.append(value.replace('"', ""))
else:
args = value.split(" ")
# list to be passed to the callback. It is also possible that this is a call where no arguments are
# present, so the whole thing is wrapped to protect against an index error.
try:
if value[0] == '"':
args.append(value.replace('"', ""))
else:
args = value.split(" ")
except IndexError:
pass
else:
_key, _value = self._get_key_value(key, value)

@ -1,5 +1,5 @@
DATE = "2020-10-06"
VERSION = "6.7.0"
DATE = "2020-12-16"
VERSION = "6.7.1"
MAJOR = 6
MINOR = 7
PATCH = 0
PATCH = 1

Loading…
Cancel
Save