Skip to content

Commit

Permalink
Add missing guard for setattrs
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Dec 10, 2019
1 parent 38a923c commit a9eee1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion magma/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def peek(cls):

def _setattrs(obj, dct):
for k, v in dct.items():
setattr(obj, k, v)
if isinstance(k, str):
setattr(obj, k, v)


class CircuitKind(type):
Expand Down

0 comments on commit a9eee1a

Please sign in to comment.