diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-02-02 12:27:01 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-02-02 12:27:01 +0100 |
commit | bceeb4a291d7f0d2f714ff6bc53e52cb8b7a3e6f (patch) | |
tree | 6c0b4946aab976c585aa6d2e35ed71ca43ab2e00 | |
parent | f39e50c4dbebb86af19127ca12887f59e70bd222 (diff) | |
download | mitmproxy-bceeb4a291d7f0d2f714ff6bc53e52cb8b7a3e6f.tar.gz mitmproxy-bceeb4a291d7f0d2f714ff6bc53e52cb8b7a3e6f.tar.bz2 mitmproxy-bceeb4a291d7f0d2f714ff6bc53e52cb8b7a3e6f.zip |
raise an ScriptException when running unloaded scripts
-rw-r--r-- | libmproxy/script/script.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libmproxy/script/script.py b/libmproxy/script/script.py index a4ed3aba..55778851 100644 --- a/libmproxy/script/script.py +++ b/libmproxy/script/script.py @@ -88,6 +88,8 @@ class Script(object): Raises: ScriptException if there was an exception. """ + if self.ns is None: + raise ScriptException("Script not loaded.") f = self.ns.get(name) if f: try: |