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

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

Loading…
Cancel
Save