From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 24 Sep 2012 22:27:09 +0000 (+0200) Subject: portageq: Automatically do not include imported functions in the list of commands. X-Git-Tag: v2.2.0_alpha133~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dc46bef30fefdcd9305bfb92f24c83758129279f;p=portage.git portageq: Automatically do not include imported functions in the list of commands. --- 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")