diff --git a/chirp/drivers/ga510.py b/chirp/drivers/ga510.py index 1642a901..62304f28 100644 --- a/chirp/drivers/ga510.py +++ b/chirp/drivers/ga510.py @@ -855,11 +855,17 @@ def apply_code(setting, obj): dtmf.append(rs) + try: + current_group = DTMFCHARS[int(anicode.groupcode)] + except IndexError: + LOG.warning('ANI group code index %i out of range', + anicode.groupcode) + current_group = DTMFCHARS[0] dtmf.append( RadioSetting( "anicode.groupcode", "Group Code", RadioSettingValueList(list(DTMFCHARS), - DTMFCHARS[int(anicode.groupcode)]))) + current_group))) else: dtmf.append(