aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/script/script.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/script/script.py b/mitmproxy/script/script.py
index 9d149f4d..9ff79f52 100644
--- a/mitmproxy/script/script.py
+++ b/mitmproxy/script/script.py
@@ -104,7 +104,7 @@ class Script(object):
sys.path.pop()
start_fn = self.ns.get("start")
- if len(inspect.getargspec(start_fn).args) == 2:
+ if start_fn and len(inspect.getargspec(start_fn).args) == 2:
warnings.warn(
"The 'args' argument of the start() script hook is deprecated. "
"Please use sys.argv instead."