Source: mitmproxy
Version: 8.1.1-5
Severity: important
Tags: patch

Dear Maintainer,

Debian patch '0010-remove-return-in-finally.patch' breaks the loading of
all custom scripts, since it removes the only return statement in
load_script(). The correct thing to do is moving the return to the end
of the try: block rather than dropping it:
@@ -36,6 +36,7 @@
         loader.exec_module(m)
         if not getattr(m, "name", None):
             m.name = path  # type: ignore
+        return m
     except Exception as e:
         script_error_handler(path, e, msg=str(e))
     finally:

Cheers,
-- 
Anton Khirnov

Reply via email to