features: add vm.features.items() function

Make it behave more like a dict.
This commit is contained in:
Marek Marczykowski-Górecki 2017-05-22 03:10:34 +02:00
förälder c826378579
incheckning 17ca883c7c
Ingen känd nyckel hittad för denna signaturen i databasen
GPG-nyckel ID: 063938BA42CFA724

Visa fil

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