From dc46bef30fefdcd9305bfb92f24c83758129279f Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 25 Sep 2012 00:27:09 +0200 Subject: portageq: Automatically do not include imported functions in the list of commands. --- bin/portageq | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/portageq b/bin/portageq index 3e7577b9c..142f8806c 100755 --- a/bin/portageq +++ b/bin/portageq @@ -773,11 +773,9 @@ list_preserved_libs.uses_eroot = True # DO NOT CHANGE CODE BEYOND THIS POINT - IT'S NOT NEEDED! # -non_commands = frozenset(['elog', 'eval_atom_use', - 'exithandler', 'expand_new_virt', 'main', - 'usage', 'writemsg', 'writemsg_stdout']) +non_commands = frozenset(['elog', 'eval_atom_use', 'exithandler', 'main', 'usage']) commands = sorted(k for k, v in globals().items() \ - if k not in non_commands and isinstance(v, types.FunctionType)) + if k not in non_commands and isinstance(v, types.FunctionType) and v.__module__ == "__main__") def usage(argv): print(">>> Portage information query tool") -- cgit v1.2.3-1-g7c22