提交 ae61691b 编写于 作者: L Lucas Meneghel Rodrigues

Merge pull request #619 from ruda/cosmetics

avocado.core: Internal attribute to take_action() is now 'dispatch'.
......@@ -72,8 +72,8 @@ class Parser(object):
# Inject --help if no arguments is present
default_args = ['--help'] if not sys.argv[1:] else None
self.args, rest = self.application.parse_known_args(args=default_args)
if not hasattr(self.args, 'func'):
self.application.set_defaults(func=self.application.print_help)
if not hasattr(self.args, 'dispatch'):
self.application.set_defaults(dispatch=self.application.print_help)
def finish(self):
"""
......@@ -87,4 +87,4 @@ class Parser(object):
"""
Take some action after parsing arguments.
"""
return self.args.func(self.args)
return self.args.dispatch(self.args)
......@@ -69,7 +69,7 @@ class Plugin(object):
To create a runner plugin, just call this method with `super()`.
To create a result plugin, just set `configure` to `True`.
"""
parser.set_defaults(func=self.run)
parser.set_defaults(dispatch=self.run)
self.configured = True
def activate(self, arguments):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册