mirror of
https://github.com/mandiant/capa.git
synced 2026-01-23 17:59:01 -08:00
rules: use rpartition instead of split(..., 1) to better express intent
This commit is contained in:
@@ -216,7 +216,7 @@ def parse_description(s, value_type, description=None):
|
||||
raise InvalidRule(
|
||||
'unexpected value: "%s", only one description allowed (inline description with ` = `)' % s
|
||||
)
|
||||
value, description = s.split(" = ", 1)
|
||||
value, _, description = s.rpartition(" = ")
|
||||
if description == "":
|
||||
raise InvalidRule('unexpected value: "%s", description cannot be empty' % s)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user