Skip to content

Commit 0c08936

Browse files
committed
fix issue determining var type - py2 incompatible - works in py3 only
1 parent c5977e7 commit 0c08936

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/lib/CIME/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def xml_to_make_variable(case, varname, cmake=False):
5858
varvalue = case.get_value(varname)
5959
if varvalue is None:
6060
return ""
61-
if type(varvalue) == type(True):
61+
if isinstance(varvalue, bool):
6262
varvalue = stringify_bool(varvalue)
6363

64-
if cmake or type(varvalue) == type(str):
64+
if cmake or isinstance(varvalue, str):
6565
return "{}{}=\"{}\" ".format("-D" if cmake else "", varname, varvalue)
6666
else:
6767
return "{}={} ".format(varname, varvalue)

0 commit comments

Comments
 (0)