Skip to content

Commit

Permalink
fhdl/structure: fix last test in _Value.__bool__ (a instead of b)
Browse files Browse the repository at this point in the history
enjoy-digital committed Nov 12, 2015
1 parent 51904d8 commit 598638b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migen/fhdl/structure.py
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def __bool__(self):
if isinstance(a, Signal) and isinstance(b, Signal):
return a is b
if (isinstance(a, Constant) and isinstance(b, Signal)
or isinstance(a, Signal) and isinstance(a, Constant)):
or isinstance(a, Signal) and isinstance(b, Constant)):
return False
raise TypeError("Attempted to convert Migen value to boolean")

1 comment on commit 598638b

@sbourdeauducq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.