diff options
author | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-06-27 12:31:47 +0000 |
---|---|---|
committer | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-06-27 12:31:47 +0000 |
commit | 36f578658c22c889bca62f48a2908926cacfa837 (patch) | |
tree | 35fee063cbd916aea7ae5665dff202c4cb2caff2 | |
parent | ceb85f28252f0cd711bf8d4d9ce5f16f09800787 (diff) | |
download | sos-36f578658c22c889bca62f48a2908926cacfa837.tar.gz |
Beautified output of --list-plugins.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@149 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rwxr-xr-x | src/sosreport | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/sosreport b/src/sosreport index 3d640572..a8090a5d 100755 --- a/src/sosreport +++ b/src/sosreport @@ -363,19 +363,22 @@ def sosreport(): # Make policy aware of the commons policy.setCommons(commons) - # validate and load plugins + # print list of available plugins plugins = os.listdir(pluginpath) if __cmdLineOpts__.listPlugins: + print "Available plugins:" + print for plug in plugins: try: if ((plug[-3:] == '.py') and (plug != "__init__.py")): - plugbase = plug[:-3] - pidot = "sos.plugins." + plugbase - print plugbase + sys.stdout.write(plug[:-3] + " ") except: print "ouch" + print + print sys.exit() + # validate and load plugins for plug in plugins: if ((plug[-3:] == '.py') and (plug != "__init__.py") and (not __cmdLineOpts__.noplugins or (plug[:-3] not in __cmdLineOpts__.noplugins)) and (not __cmdLineOpts__.onlyplugins or (plug[:-3] in __cmdLineOpts__.onlyplugins)) ): try: |