diff options
author | Matthew Shao <me@matshao.com> | 2015-11-11 09:03:05 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2015-11-11 09:03:05 +0800 |
commit | 3f6521f9125b13f61192fefde94d9b6d0fc6e489 (patch) | |
tree | 86bf5025fd4b929c7f34fbae4375d0fbe4b5a960 /libmproxy/flow.py | |
parent | 3739e1fe82c83ada3289dea5e24f9efcc7175696 (diff) | |
download | mitmproxy-3f6521f9125b13f61192fefde94d9b6d0fc6e489.tar.gz mitmproxy-3f6521f9125b13f61192fefde94d9b6d0fc6e489.tar.bz2 mitmproxy-3f6521f9125b13f61192fefde94d9b6d0fc6e489.zip |
Use watchdog to reload scripts automatically.
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r-- | libmproxy/flow.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 55a4dbcf..7cce5193 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -667,6 +667,10 @@ class FlowMaster(controller.Master): self.add_event("Script error:\n" + str(e), "error") self.scripts.remove(script_obj) + def reload_scripts(self): + for s in self.scripts[:]: + s.load() + def load_script(self, command): """ Loads a script. Returns an error description if something went |