Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#androidenv Fix broad exception in task_manager.py #225

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions android_env/components/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,13 @@ def _extras_handler(event, match):
if extra:
try:
extra = ast.literal_eval(extra)
# Except all to avoid unnecessary crashes, only log error.
except Exception: # pylint: disable=broad-except
except (
ValueError,
TypeError,
SyntaxError,
MemoryError,
RecursionError,
):
logging.exception('Could not parse extra: %s', extra)
# Don't try to process the extra as text; that would probably crash.
return
Expand Down
Loading