We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc8a4ca commit 3291110Copy full SHA for 3291110
1 file changed
canopen/sdo/exceptions.py
@@ -54,6 +54,10 @@ def __str__(self):
54
text = text + ", " + self.CODES[self.code]
55
return text
56
57
+ def __eq__(self, other):
58
+ """Compare two exception objects based on SDO abort code."""
59
+ return self.code == other.code
60
+
61
62
class SdoCommunicationError(SdoError):
63
"""No or unexpected response from slave."""
0 commit comments