mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/idf_py_replace_run_with_call' into 'master'
tools: idf.py: replace the "run" method of Task with the magic "__call__" method See merge request espressif/esp-idf!8763
This commit is contained in:
commit
514596cb81
@ -200,7 +200,7 @@ def init_cli(verbose_output=None):
|
|||||||
self.action_args = action_args
|
self.action_args = action_args
|
||||||
self.aliases = aliases
|
self.aliases = aliases
|
||||||
|
|
||||||
def run(self, context, global_args, action_args=None):
|
def __call__(self, context, global_args, action_args=None):
|
||||||
if action_args is None:
|
if action_args is None:
|
||||||
action_args = self.action_args
|
action_args = self.action_args
|
||||||
|
|
||||||
@ -611,7 +611,7 @@ def init_cli(verbose_output=None):
|
|||||||
name_with_aliases += " (aliases: %s)" % ", ".join(task.aliases)
|
name_with_aliases += " (aliases: %s)" % ", ".join(task.aliases)
|
||||||
|
|
||||||
print("Executing action: %s" % name_with_aliases)
|
print("Executing action: %s" % name_with_aliases)
|
||||||
task.run(ctx, global_args, task.action_args)
|
task(ctx, global_args, task.action_args)
|
||||||
|
|
||||||
self._print_closing_message(global_args, tasks_to_run.keys())
|
self._print_closing_message(global_args, tasks_to_run.keys())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user