Browse Source

features: add vm.features.items() function

Make it behave more like a dict.
Marek Marczykowski-Górecki 7 years ago
parent
commit
17ca883c7c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      qubesadmin/features.py

+ 5 - 0
qubesadmin/features.py

@@ -60,6 +60,11 @@ class Features(object):
 
     keys = __iter__
 
+    def items(self):
+        '''Return iterable of pairs (feature, value)'''
+        for key in self:
+            yield key, self[key]
+
     _NO_DEFAULT = object()
 
     def check_with_template(self, feature, default=_NO_DEFAULT):