From 84e4d6d57534be5d5e12b2e1e6ed60d564b64e57 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Mar 2020 23:03:06 +0530 Subject: [PATCH] Options Exception in script --- mitmproxy/addons/script.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mitmproxy/addons/script.py b/mitmproxy/addons/script.py index 3b2568c9b..0e6c02524 100644 --- a/mitmproxy/addons/script.py +++ b/mitmproxy/addons/script.py @@ -105,11 +105,14 @@ class Script: # We're already running, so we have to explicitly register and # configure the addon ctx.master.addons.invoke_addon(self.ns, "running") - ctx.master.addons.invoke_addon( - self.ns, - "configure", - ctx.options.keys() - ) + try: + ctx.master.addons.invoke_addon( + self.ns, + "configure", + ctx.options.keys() + ) + except exceptions.OptionsError as e: + script_error_handler(self.fullpath,e,str(e)) async def watcher(self): last_mtime = 0