Fix up typing and metadata usage.

This commit is contained in:
Mike Auty
2018-05-01 21:21:12 +01:00
parent 9512cbe9eb
commit 4dbfdcc9dd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -315,7 +315,7 @@ class WintelStacker(interfaces.automagic.StackerLayerInterface):
if arch not in ['Intel32', 'Intel64']:
return None
# Set the layer type
layer_type = intel.WindowsIntel
layer_type = intel.WindowsIntel # type: typing.Type
if arch == 'Intel64':
layer_type = intel.WindowsIntel32e
elif base_layer.metadata.get('pae', False):
@@ -588,7 +588,7 @@ class TranslationLayerRequirement(ConstructableRequirementInterface, Configurabl
if value not in context.memory:
vollog.log(9, "IndexError - Layer not found in memory space: {}".format(value))
return [path_join(config_path, self.name)]
if self.oses and context.memory[value].os not in self.oses:
if self.oses and context.memory[value].metadata.get('os', None) not in self.oses:
vollog.log(9, "TypeError - Layer is not the required OS: {}".format(value))
return [path_join(config_path, self.name)]
if (self.architectures and