Browse Source

vm/adminvm: make AdminVM sortable

One more thing gone during changing AdminVM base class.
Marek Marczykowski-Górecki 7 years ago
parent
commit
e4d285d479
1 changed files with 4 additions and 0 deletions
  1. 4 0
      qubes/vm/adminvm.py

+ 4 - 0
qubes/vm/adminvm.py

@@ -52,6 +52,10 @@ class AdminVM(qubes.vm.BaseVM):
     def __str__(self):
         return self.name
 
+    def __lt__(self, other):
+        # order dom0 before anything
+        return self.name != other.name
+
     @property
     def attached_volumes(self):
         return []