Skip to content

Commit

Permalink
feat: make ErrorType enums compare as strings
Browse files Browse the repository at this point in the history
The DBusError exception stores the error type as string. This makes the
exception not directly compare to the ErrorType members (for example
DBusError(ErrorType.FAILED, "").type != ErrorType.FAILED). This makes
ErrorType also a string to make this comparision work.
  • Loading branch information
agners committed Nov 21, 2023
1 parent 6143cb1 commit f6a3cbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dbus_fast/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ArgDirection(Enum):
OUT = "out"


class ErrorType(Enum):
class ErrorType(str, Enum):
"""An enum for the type of an error for a message reply.
:seealso: http://man7.org/linux/man-pages/man3/sd-bus-errors.3.html
Expand Down

0 comments on commit f6a3cbf

Please sign in to comment.