From 1047f6592ac81643cd847f104da766dc4a4c81ea Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 23 Nov 2015 08:55:45 +1300 Subject: recipetool: make plugin registration function name consistent with devtool This should have been register_commands rather than register_command; I used register_commands in devtool so lets change this here to be consistent with that. (Since this is extensible through layers though we need to remain compatible with the old name, so fall back to that if the new function name isn't there.) Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton --- scripts/recipetool | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/recipetool') diff --git a/scripts/recipetool b/scripts/recipetool index 4af0bfb686..791a66aaca 100755 --- a/scripts/recipetool +++ b/scripts/recipetool @@ -82,7 +82,11 @@ def main(): registered = False for plugin in plugins: - if hasattr(plugin, 'register_command'): + if hasattr(plugin, 'register_commands'): + registered = True + plugin.register_commands(subparsers) + elif hasattr(plugin, 'register_command'): + # Legacy function name registered = True plugin.register_command(subparsers) if hasattr(plugin, 'tinfoil_init'): -- cgit v1.2.3