Skip to content

Commit

Permalink
Make isprimitive more robust using getattr
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Aug 16, 2018
1 parent 9a58f92 commit 47da795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magma/circuit.py
Expand Up @@ -373,7 +373,7 @@ def isdefinition(circuit):
return getattr(circuit, "is_definition", False)

def isprimitive(circuit):
return circuit.primitive
return getattr(circuit, "primitive", False)

# a map from circuitDefinition names to circuit definition objects
definitionCache = {}
Expand Down

0 comments on commit 47da795

Please sign in to comment.