diff options
Diffstat (limited to 'guiconfig.py')
| -rwxr-xr-x | guiconfig.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/guiconfig.py b/guiconfig.py index ca04e06..7ce3cb1 100755 --- a/guiconfig.py +++ b/guiconfig.py @@ -1308,15 +1308,13 @@ def _check_valid(dialog, entry, 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): messagebox.showerror( "Value out of range", - "{} is outside the range {}-{}".format( - s, low_sym.str_value, high_sym.str_value), + "{} is outside the range {}-{}".format(s, low_s, high_s), parent=dialog) entry.focus_set() return False |
