Skip to content

Commit

Permalink
FIX: make hypercall return none always
Browse files Browse the repository at this point in the history
  • Loading branch information
lacraig2 committed Aug 1, 2024
1 parent fda98c7 commit 852a11a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions panda/python/core/pandare/panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -3496,8 +3496,7 @@ def decorator(fun):
def _run_and_catch(*args, **kwargs): # Run function but if it raises an exception, stop panda and raise it
if not hasattr(self, "exit_exception"):
try:
r = fun(*args, **kwargs)
return r
fun(*args, **kwargs)
except Exception as e:
# exceptions wont work in our thread. Therefore we print it here and then throw it after the
# machine exits.
Expand All @@ -3506,7 +3505,6 @@ def _run_and_catch(*args, **kwargs): # Run function but if it raises an exceptio
self.end_analysis()
else:
raise e
return None

hook_cb_passed = hypercall_cb_type(_run_and_catch)
if type(magic) is int:
Expand Down

0 comments on commit 852a11a

Please sign in to comment.