From 93d7249ef033aeede504ed5ab6f163566da53621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 25 May 2017 16:10:39 +0200 Subject: [PATCH] Make VMCollection return sorted VM list on iteration This makes it much easier to write tests... --- qubesadmin/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesadmin/app.py b/qubesadmin/app.py index 6a07b09..0e9700a 100644 --- a/qubesadmin/app.py +++ b/qubesadmin/app.py @@ -101,7 +101,7 @@ class VMCollection(object): def __iter__(self): self.refresh_cache() - for vm in self._vm_list: + for vm in sorted(self._vm_list): yield self[vm] def keys(self):