From 7ef020d5fe2fcb6b93c282860b0baf44bff42dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 1 May 2017 02:25:50 +0200 Subject: [PATCH] devices: fix 'NotImplemented' usage '__eq__' function should return 'NotImplemented' _value_, not 'NotImplementedError' exception. --- qubes/devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/devices.py b/qubes/devices.py index a889a48b..fdc929c4 100644 --- a/qubes/devices.py +++ b/qubes/devices.py @@ -75,7 +75,7 @@ class DeviceAssignment(object): # pylint: disable=too-few-public-methods def __eq__(self, other): if not isinstance(self, other.__class__): - raise NotImplementedError + return NotImplemented return self.backend_domain == other.backend_domain \ and self.ident == other.ident