Skip to content

Commit

Permalink
fix: account for case w no functions
Browse files Browse the repository at this point in the history
  • Loading branch information
devtooligan committed Jul 7, 2023
1 parent 5699349 commit 42cd6e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions slither/utils/halstead.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def populate_operators_and_operands(self):
"""Populate the operators and operands lists."""
operators = []
operands = []
if not hasattr(self.contract, "functions"):
return
for func in self.contract.functions:
for node in func.nodes:
for operation in node.irs:
Expand Down

0 comments on commit 42cd6e0

Please sign in to comment.