diff options
Diffstat (limited to 'libmproxy/script.py')
-rw-r--r-- | libmproxy/script.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmproxy/script.py b/libmproxy/script.py index e13f0e2b..b4ecfbbf 100644 --- a/libmproxy/script.py +++ b/libmproxy/script.py @@ -95,8 +95,8 @@ class Script: """ if self.ns is not None: self.unload() - ns = {} script_dir = os.path.dirname(os.path.abspath(self.args[0])) + ns = {'__file__': os.path.abspath(self.args[0])} sys.path.append(script_dir) try: execfile(self.args[0], ns, ns) @@ -179,7 +179,8 @@ def concurrent(fn): "error", "clientconnect", "serverconnect", - "clientdisconnect"): + "clientdisconnect", + "next_layer"): def _concurrent(ctx, obj): _handle_concurrent_reply(fn, obj, ctx, obj) |