From c295c312dd76be6b61bdaccda5b70be9cb79cf5f Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 7 Jun 2019 17:49:05 +0200 Subject: menuconfig/guiconfig: Clean up 'range' checking a bit Just cosmetic. --- menuconfig.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'menuconfig.py') diff --git a/menuconfig.py b/menuconfig.py index 77558eb..cfcfbef 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -3077,14 +3077,12 @@ def _check_valid(sym, s): for low_sym, high_sym, cond in sym.ranges: if expr_value(cond): - low = int(low_sym.str_value, base) - val = int(s, base) - high = int(high_sym.str_value, base) + low_s = low_sym.str_value + high_s = high_sym.str_value - if not low <= val <= high: + if not int(low_s, base) <= int(s, base) <= int(high_s, base): _error("{} is outside the range {}-{}" - .format(s, low_sym.str_value, high_sym.str_value)) - + .format(s, low_s, high_s)) return False break -- cgit v1.2.3