From: Giacomo Travaglini Date: Thu, 19 Nov 2020 11:32:02 +0000 (+0000) Subject: python: Fix toBool converter X-Git-Tag: develop-gem5-snapshot~432 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=692128dd324e7dbdef9de39361232b104e6b581d;p=gem5.git python: Fix toBool converter It was using an undefined variable (result) which was mistakenly left there after its latest refactor Change-Id: I50bb9b1e7793045556a29306faea5f455b29819d Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37755 Reviewed-by: Gabe Black Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/python/m5/util/convert.py b/src/python/m5/util/convert.py index 077b6b4dc..d3088f603 100644 --- a/src/python/m5/util/convert.py +++ b/src/python/m5/util/convert.py @@ -145,7 +145,7 @@ def toBool(value): return True if value in ('false', 'f', 'no', 'n', '0'): return False - return result + raise ValueError("cannot convert '%s' to bool" % value) def toFrequency(value): return toMetricFloat(value, 'frequency', 'Hz')