summaryrefslogtreecommitdiffstats
path: root/bin/portageq
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-09-25 00:27:09 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-09-25 00:27:09 +0200
commitdc46bef30fefdcd9305bfb92f24c83758129279f (patch)
tree0cb662177b7fb509c67077ffd3f6916d4a935427 /bin/portageq
parent11ad9440901f17cb01d43d8d0f2bdded1efb24a6 (diff)
downloadportage-dc46bef30fefdcd9305bfb92f24c83758129279f.tar.gz
portage-dc46bef30fefdcd9305bfb92f24c83758129279f.tar.bz2
portage-dc46bef30fefdcd9305bfb92f24c83758129279f.zip
portageq: Automatically do not include imported functions in the list of commands.
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq6
1 files changed, 2 insertions, 4 deletions
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")