Skip to content

Commit

Permalink
Merge pull request #846 from crytic/dev-value-get
Browse files Browse the repository at this point in the history
Fix minor dict access issues
  • Loading branch information
montyly authored May 7, 2021
2 parents 55a2678 + a5c35ef commit 3e16227
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slither/solc_parsing/expressions/expression_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
assert "children" not in expression

if is_compact_ast:
value = expression["value"]
value = expression.get("value", None)
if value:
if "subdenomination" in expression and expression["subdenomination"]:
subdenomination = expression["subdenomination"]
Expand All @@ -742,7 +742,7 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
if expression["kind"] == "number":
type_candidate = "int_const"
else:
value = expression["attributes"]["value"]
value = expression["attributes"].get("value", None)
if value:
if (
"subdenomination" in expression["attributes"]
Expand Down

0 comments on commit 3e16227

Please sign in to comment.