devices: fix 'NotImplemented' usage

'__eq__' function should return 'NotImplemented' _value_, not
'NotImplementedError' exception.
This commit is contained in:
Marek Marczykowski-Górecki 2017-05-01 02:25:50 +02:00
parent 4f0d72f99a
commit 7ef020d5fe
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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