Fix processing of search patterns

pull/407/head
Bernhard Mueller 6 years ago
parent 82200d8df6
commit 26f839aa3c
  1. 8
      mythril/ether/ethcontract.py

@ -38,7 +38,11 @@ class ETHContract(persistent.Persistent):
str_eval = '' str_eval = ''
easm_code = None easm_code = None
tokens = filter(None, re.split("(and|or|not)", expression.replace(" ", ""), re.IGNORECASE)) # tokens = filter(None, re.split("( and | or | not )", expression.replace(" ", ""), re.IGNORECASE))
tokens = re.split("\s+(and|or|not)\s+", expression, re.IGNORECASE)
print(tokens)
for token in tokens: for token in tokens:
@ -66,4 +70,6 @@ class ETHContract(persistent.Persistent):
continue continue
print(str_eval)
return eval(str_eval.strip()) return eval(str_eval.strip())

Loading…
Cancel
Save