From: Nathan Binkert Date: Thu, 24 Mar 2005 17:24:54 +0000 (-0500) Subject: Improve toBool X-Git-Tag: m5_1.0_tutorial~67^2~7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d10412d565c8138cd4649c8ea905cd892cf2a4d2;p=gem5.git Improve toBool python/m5/convert.py: an empty string should still be false --HG-- extra : convert_revision : dd9900794d94cd018b57ec81bcbce1d412e2a83e --- diff --git a/python/m5/convert.py b/python/m5/convert.py index 2f69645b9..4a4492af7 100644 --- a/python/m5/convert.py +++ b/python/m5/convert.py @@ -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