diff options
author | Aldo Cortesi <aldo@corte.si> | 2014-09-07 13:04:18 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2014-09-07 13:04:18 +1200 |
commit | bf5fef1e0b52854683984abb9023a395521d003a (patch) | |
tree | a437207b26620616d0905d106e3c4972d1f9ef20 /libmproxy/script.py | |
parent | c1438050ed7263872fb64b19fbb06428bd4605ac (diff) | |
parent | 3d62e90dbf7ea05283e16752531a261e53a4bb47 (diff) | |
download | mitmproxy-bf5fef1e0b52854683984abb9023a395521d003a.tar.gz mitmproxy-bf5fef1e0b52854683984abb9023a395521d003a.tar.bz2 mitmproxy-bf5fef1e0b52854683984abb9023a395521d003a.zip |
Merge pull request #347 from mitmproxy/issue_341
Remove BackReferenceMixin
Diffstat (limited to 'libmproxy/script.py')
-rw-r--r-- | libmproxy/script.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libmproxy/script.py b/libmproxy/script.py index d4b02ead..f5fb6b41 100644 --- a/libmproxy/script.py +++ b/libmproxy/script.py @@ -138,13 +138,8 @@ def _handle_concurrent_reply(fn, o, *args, **kwargs): def concurrent(fn): - if fn.func_name in ["request", "response", "error"]: - def _concurrent(ctx, flow): - r = getattr(flow, fn.func_name) - _handle_concurrent_reply(fn, r, ctx, flow) - return _concurrent - elif fn.func_name in ["clientconnect", "serverconnect", "clientdisconnect"]: - def _concurrent(ctx, conn): - _handle_concurrent_reply(fn, conn, ctx, conn) + if fn.func_name in ("request", "response", "error", "clientconnect", "serverconnect", "clientdisconnect"): + def _concurrent(ctx, obj): + _handle_concurrent_reply(fn, obj, ctx, obj) return _concurrent raise NotImplementedError("Concurrent decorator not supported for this method.") |