mirror of https://github.com/ARMmbed/mbed-os.git
Simplified max/min condition
parent
861816c20b
commit
de4b7607a0
|
@ -1204,8 +1204,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",
|
||||
|
|
Loading…
Reference in New Issue