summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-03-24 12:24:54 -0500
committerNathan Binkert <binkertn@umich.edu>2005-03-24 12:24:54 -0500
commitd10412d565c8138cd4649c8ea905cd892cf2a4d2 (patch)
tree8d784aa8d4e85643cbdba2510e52c77e997ed9e7 /python
parenteeff53841a6cb6c3819b69543fae861fa84cc541 (diff)
downloadgem5-d10412d565c8138cd4649c8ea905cd892cf2a4d2.tar.xz
Improve toBool
python/m5/convert.py: an empty string should still be false --HG-- extra : convert_revision : dd9900794d94cd018b57ec81bcbce1d412e2a83e
Diffstat (limited to 'python')
-rw-r--r--python/m5/convert.py2
1 files changed, 2 insertions, 0 deletions
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