Skip to content

Commit

Permalink
Catch TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Aug 21, 2023
1 parent 5a518fc commit bad3ba0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions auto_editor/lang/palet.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,8 @@ def ref(seq: Any, ref: int) -> Any:
if isinstance(seq, np.ndarray) and seq.dtype == np.bool_:
return int(seq[ref])
return seq[ref]
except KeyError:
except (KeyError, IndexError, TypeError):
raise MyError(f"ref: Invalid key: {print_str(ref)}")
except IndexError:
raise MyError(f"ref: Invalid index: {print_str(ref)}")


def p_slice(
Expand Down

0 comments on commit bad3ba0

Please sign in to comment.