Improve toBool
python/m5/convert.py:
an empty string should still be false
--HG--
extra : convert_revision : dd9900794d94cd018b57ec81bcbce1d412e2a83e
This commit is contained in:
@@ -81,6 +81,8 @@ def toBool(val):
|
||||
return True
|
||||
elif val == "false" or val == "f" or val == "no" or val == "n":
|
||||
return False
|
||||
elif val == "":
|
||||
return False
|
||||
|
||||
return toInteger(val) != 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user