diff --git a/ova-compose/ova-compose.py b/ova-compose/ova-compose.py index 1eee91c..02486c6 100755 --- a/ova-compose/ova-compose.py +++ b/ova-compose/ova-compose.py @@ -644,8 +644,8 @@ def __init__(self, **kwargs): for k, v in props.items(): self.properties.append(OVFProperty(k, **v)) - self.transports = kwargs.get('transports', None) - self.categories = kwargs.get('categories', None) + self.transports = kwargs.get('transports', []) + self.categories = kwargs.get('categories', {}) # if a property references a non-existing category it will be dropped for prop in self.properties: @@ -867,6 +867,8 @@ def from_dict(cls, config): annotation = None eula = None + assert 'hardware' in config, "config needs a 'hardware' section" + hardware = config['hardware'] for hw_id, hw in hardware.items(): if isinstance(hw, dict):