aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-03-14 09:22:44 +1300
committerAldo Cortesi <aldo@corte.si>2017-03-14 09:40:33 +1300
commitb745428b5c4e89753a83fe228cb5478327eeb540 (patch)
tree7681c0f345d13243e1c28deb8c8144c2061a26e4 /examples/simple
parent2832e790fd27d45f8bfbed1b4ce7f1e15910018d (diff)
downloadmitmproxy-b745428b5c4e89753a83fe228cb5478327eeb540.tar.gz
mitmproxy-b745428b5c4e89753a83fe228cb5478327eeb540.tar.bz2
mitmproxy-b745428b5c4e89753a83fe228cb5478327eeb540.zip
Enable custom options in config files
We also now ignore unknown options in config files by default, and print a warning if verbosity is incremented.
Diffstat (limited to 'examples/simple')
-rw-r--r--examples/simple/custom_option.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/simple/custom_option.py b/examples/simple/custom_option.py
index a8b4e778..324d27e7 100644
--- a/examples/simple/custom_option.py
+++ b/examples/simple/custom_option.py
@@ -7,4 +7,5 @@ def start(options):
def configure(options, updated):
- ctx.log.info("custom option value: %s" % options.custom)
+ if "custom" in updated:
+ ctx.log.info("custom option value: %s" % options.custom)