Merge pull request #1493 from xjrc/bugfix/nonbool-variants
Bug Fix : Allow Packages to Have Variants w/ Non-Bool, Non-String Defaults
This commit is contained in:
commit
ec7f58bf96
1 changed files with 3 additions and 4 deletions
|
@ -332,11 +332,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):
|
||||
|
|
Loading…
Reference in a new issue