Bug 1374824 - Fix --enable-stylo value processing; r=froydnj

The argument passed to the function is a PositiveOptionValue,
which represents its option values as a tuple. The __eq__ for
this type first compares type() of the operands. Since the
previous code compared a PositiveOptionValue to a string
literal, this always failed. There's possibly room to
improve the behavior of PositiveOptionValue. But for now,
let's rewrite stylo_config() so it works.

MozReview-Commit-ID: B4vkYwCDHrb

--HG--
extra : rebase_source : 639711bde7b96749405905825aae37a7908554a8
This commit is contained in:
Gregory Szorc 2017-06-21 12:17:37 -07:00
parent 6d1819c652
commit d34a0c3506

View File

@ -631,7 +631,7 @@ def stylo_config(value):
# The default is to not build Stylo at all.
if value.origin == 'default':
pass
elif value == 'build':
elif len(value) and value[0] == 'build':
build_stylo = True
elif bool(value):
build_stylo = True