mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Don't fail when start() is not defined
This commit is contained in:
parent
63c6660895
commit
c2b5a13e3f
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user