Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions plugins_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def add_all_items(method, dest, plugfd, wrapopen=r'\(', wrapclose=r'\)'):
# dirty hack to remove spaces and "Plugin"
if "Plugin" not in it:
continue
it = it.strip(' ()')[0:-6]
if "=" in it:
it = re.sub(r"Plugin.*", "Plugin", it)
plug_col_len = 9 if "PluginOpt" in it else 6
it = it.strip(' ()')[:-plug_col_len]
if len(it):
dest.append(it)
# list of specs separated by comma ..
Expand Down Expand Up @@ -94,7 +97,8 @@ def add_all_items(method, dest, plugfd, wrapopen=r'\(', wrapclose=r'\)'):
pfd_content = pfd.read().replace('\n', '')
add_all_items(
"from sos.report.plugins import ", plugs_data[plugname]['distros'],
pfd_content, wrapopen='', wrapclose='(class|from|import)'
pfd_content, wrapopen='',
wrapclose=r'(class|from|import|#|\))'
)
add_all_items("profiles = ", plugs_data[plugname]['profiles'],
pfd_content, wrapopen='')
Expand Down
Loading