Don't fail when start() is not defined

This commit is contained in:
Aldo Cortesi 2016-06-14 14:39:07 +12:00
parent 63c6660895
commit c2b5a13e3f

View File

@ -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."