fixed yaml error

This commit is contained in:
Gregory Becker 2015-12-17 15:26:27 -08:00
parent b5216f6ec8
commit 217a2d9ea5
2 changed files with 6 additions and 1 deletions

View File

@ -79,6 +79,8 @@ def to_dict(self):
@staticmethod
def from_dict(d):
if d is None:
return None
target = Target.__new__(Target)
target.name = d['name']
target.module_name = d['module_name']

View File

@ -651,10 +651,13 @@ def to_node_dict(self):
d = {
'variants' : dict(
(name,v.enabled) for name, v in self.variants.items()),
'arch' : self.architecture.to_dict(),
'dependencies' : dict((d, self.dependencies[d].dag_hash())
for d in sorted(self.dependencies))
}
if self.architecture:
d['arch'] = self.architecture.to_dict()
else:
d['arch'] = None
if self.compiler:
d.update(self.compiler.to_dict())
else: