From 59262edf8237d5740ed0f98255058ae350ee4cde Mon Sep 17 00:00:00 2001 From: Cruz Monrreal II Date: Mon, 28 Jan 2019 14:01:48 -0600 Subject: [PATCH] Simplified max/min condition --- tools/config/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/config/__init__.py b/tools/config/__init__.py index 74e4071af8..e6d09899a2 100644 --- a/tools/config/__init__.py +++ b/tools/config/__init__.py @@ -1209,8 +1209,7 @@ class Config(object): min = int(str(min), 0) if min is not None else None max = int(str(max), 0) if max is not None else None - if ((value < min if min is not None else False) or - (value > max if max is not None else False)): + if (min is not None and value < min) or (max is not None and value > max): err_msg += "\nInvalid config range for %s, is not in the required range: [%s:%s]"\ % (param, min if min is not None else "-inf",