@@ -1844,23 +1844,23 @@ def _check_valid(dialog, entry, sym, s):
18441844 # Returns True if the string 's' is a well-formed value for 'sym'.
18451845 # Otherwise, pops up an error and returns False.
18461846
1847- if sym .type not in (INT , HEX ):
1847+ if sym .orig_type not in (INT , HEX ):
18481848 # Anything goes for non-int/hex symbols
18491849 return True
18501850
1851- base = 10 if sym .type == INT else 16
1851+ base = 10 if sym .orig_type == INT else 16
18521852 try :
18531853 int (s , base )
18541854 except ValueError :
18551855 messagebox .showerror (
18561856 "Bad value" ,
1857- "'{}' is a malformed {} value" .format (s , TYPE_TO_STR [sym .type ]),
1857+ "'{}' is a malformed {} value" .format (s , TYPE_TO_STR [sym .orig_type ]),
18581858 parent = dialog ,
18591859 )
18601860 entry .focus_set ()
18611861 return False
18621862
1863- for low_sym , high_sym , cond in sym .ranges :
1863+ for low_sym , high_sym , cond , _ in sym .ranges :
18641864 if expr_value (cond ):
18651865 low_s = low_sym .str_value
18661866 high_s = high_sym .str_value
@@ -1883,8 +1883,8 @@ def _range_info(sym):
18831883 # Returns a string with information about the valid range for the symbol
18841884 # 'sym', or None if 'sym' doesn't have a range
18851885
1886- if sym .type in (INT , HEX ):
1887- for low , high , cond in sym .ranges :
1886+ if sym .orig_type in (INT , HEX ):
1887+ for low , high , cond , _ in sym .ranges :
18881888 if expr_value (cond ):
18891889 return "Range: {}-{}" .format (low .str_value , high .str_value )
18901890
0 commit comments