This commit is contained in:
William Ballenthin
2020-07-06 16:54:52 -06:00
parent ca175f02c7
commit 248c27c9e8

View File

@@ -221,7 +221,8 @@ def parse_description(s, value_type, description=None):
if value_type != "string" and isinstance(s, six.string_types) and DESCRIPTION_SEPARATOR in s:
if description:
raise InvalidRule(
'unexpected value: "%s", only one description allowed (inline description with `%s`)' % (s, DESCRIPTION_SEPARATOR)
'unexpected value: "%s", only one description allowed (inline description with `%s`)'
% (s, DESCRIPTION_SEPARATOR)
)
value, _, description = s.rpartition(DESCRIPTION_SEPARATOR)
if description == "":