Skip to content

Commit

Permalink
Merge pull request #619 from ruda/cosmetics
Browse files Browse the repository at this point in the history
avocado.core: Internal attribute to take_action() is now 'dispatch'.
  • Loading branch information
lmr committed May 27, 2015
2 parents 55a937c + 0b1cd3b commit ae61691
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions avocado/core/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def resume(self):
# 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):
"""
Expand All @@ -87,4 +87,4 @@ def take_action(self):
"""
Take some action after parsing arguments.
"""
return self.args.func(self.args)
return self.args.dispatch(self.args)
2 changes: 1 addition & 1 deletion avocado/core/plugins/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def configure(self, parser):
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):
Expand Down

0 comments on commit ae61691

Please sign in to comment.