diff --git a/qubes/devices.py b/qubes/devices.py index 4540f19d..a2d4dd8f 100644 --- a/qubes/devices.py +++ b/qubes/devices.py @@ -359,6 +359,12 @@ class DeviceInfo(object): self.ident == other.ident ) + def __lt__(self, other): + if isinstance(other, DeviceInfo): + return (self.backend_domain, self.ident) < \ + (other.backend_domain, other.ident) + return NotImplemented + def __str__(self): return '{!s}:{!s}'.format(self.backend_domain, self.ident)