From 692128dd324e7dbdef9de39361232b104e6b581d Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 19 Nov 2020 11:32:02 +0000 Subject: [PATCH] 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 --- src/python/m5/util/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.30.2