Skip to content

Commit

Permalink
fix: nonetype module causes crash
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Mar 6, 2023
1 parent 294b72e commit ba65e5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/creosote/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ def get_module_info_from_code(path):
if isinstance(node, ast.Import):
module = []
elif isinstance(node, ast.ImportFrom):
module = node.module.split(".")
if node.module:
module = node.module.split(".")
else:
module = []
else:
continue

Expand Down

0 comments on commit ba65e5f

Please sign in to comment.