Fixed a bug that was making packages with non-bool default variants to crash.

This commit is contained in:
Joseph Ciurej 2016-08-10 11:54:33 -07:00
parent d380d16427
commit aa860bf4df

View File

@ -328,11 +328,10 @@ def copy(self):
return VariantSpec(self.name, self.value)
def __str__(self):
if self.value in [True, False]:
out = '+' if self.value else '~'
return out + self.name
if type(self.value) == bool:
return '{0}{1}'.format('+' if self.value else '~', self.name)
else:
return ' ' + self.name + "=" + self.value
return ' {0}={1}'.format(self.name, self.value)
class VariantMap(HashableMap):