Skip to content

Commit 55957d6

Browse files
committed
proper python3 exception inheritance
1 parent 6ba0f47 commit 55957d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/uds.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,13 @@ class MessageTimeoutError(Exception):
213213

214214
class NegativeResponseError(Exception):
215215
def __init__(self, message, service_id, error_code):
216-
super(Exception, self).__init__(message)
216+
self.message = message
217217
self.service_id = service_id
218218
self.error_code = error_code
219219

220+
def __str__(self):
221+
return self.message
222+
220223
class InvalidServiceIdError(Exception):
221224
pass
222225

0 commit comments

Comments
 (0)