Skip to content

Commit da93039

Browse files
SpotlightKidmgeier
authored andcommitted
Make TransportState class hashable
Signed-off-by: Christopher Arndt <[email protected]>
1 parent 439d37d commit da93039

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/jack.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ def set_alias(self, alias):
17751775

17761776
def unset_alias(self, alias):
17771777
"""Remove an alias for the JACK port.
1778-
1778+
17791779
If the alias doesn't exist this function will return an error.
17801780
17811781
"""
@@ -2627,6 +2627,9 @@ def __init__(self, code):
26272627
def __eq__(self, other):
26282628
return self._code == other
26292629

2630+
def __hash__(self):
2631+
return hash(self._code)
2632+
26302633
def __repr__(self):
26312634
return 'jack.' + {
26322635
_lib.JackTransportStopped: 'STOPPED',

0 commit comments

Comments
 (0)