Improve toBool

python/m5/convert.py:
    an empty string should still be false

--HG--
extra : convert_revision : dd9900794d94cd018b57ec81bcbce1d412e2a83e
This commit is contained in:
Nathan Binkert
2005-03-24 12:24:54 -05:00
parent eeff53841a
commit d10412d565

View File

@@ -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