aboutsummaryrefslogtreecommitdiffstats
path: root/examples/stub.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-07-15 13:22:20 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-07-15 14:52:34 +1200
commit4ba7ce50c6aa7b96325e201f65747a3a6ace1a7a (patch)
tree462636079d7c0d7529242ac5fce71ef799ca9131 /examples/stub.py
parentfcc1416ffd82a3497bf17323b4bb467e7e4435f4 (diff)
downloadmitmproxy-4ba7ce50c6aa7b96325e201f65747a3a6ace1a7a.tar.gz
mitmproxy-4ba7ce50c6aa7b96325e201f65747a3a6ace1a7a.tar.bz2
mitmproxy-4ba7ce50c6aa7b96325e201f65747a3a6ace1a7a.zip
Add .start for addons and scripts
Also improve error messages, fix various unit tests
Diffstat (limited to 'examples/stub.py')
-rw-r--r--examples/stub.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/stub.py b/examples/stub.py
index 614acee2..7de4012a 100644
--- a/examples/stub.py
+++ b/examples/stub.py
@@ -4,6 +4,15 @@ import mitmproxy
"""
+
+def start():
+ """
+ Called once on script startup before any other events
+ """
+ mitmproxy.ctx.log("start")
+
+
+
def configure(options):
"""
Called once on script startup before any other events, and whenever options changes.