Skip to content

Commit

Permalink
Protect against name=None in remove_wild.
Browse files Browse the repository at this point in the history
This at least should fix #7.
  • Loading branch information
Technologicat committed Jun 25, 2019
1 parent beab756 commit e3024d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyan/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,9 @@ def remove_wild(self, from_node, to_node, name):
Used for cleaning up forward-references once resolved.
This prevents spurious edges due to expand_unknowns()."""

if name is None: # relative imports may create nodes with name=None.
return

if from_node not in self.uses_edges: # no uses edges to remove
return

Expand Down

0 comments on commit e3024d6

Please sign in to comment.