Merge "Fix for getting glance command list"
This commit is contained in:
commit
1d0851cd74
|
@ -289,9 +289,14 @@ def generate_command(os_command, os_file):
|
||||||
:param os_file: open filehandle for output of DocBook file
|
:param os_file: open filehandle for output of DocBook file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
help_lines = subprocess.check_output([os_command, "--help"],
|
if os_command == "glance":
|
||||||
universal_newlines=True,
|
help_lines = subprocess.check_output([os_command, "help"],
|
||||||
stderr=DEVNULL).split('\n')
|
universal_newlines=True,
|
||||||
|
stderr=DEVNULL).split('\n')
|
||||||
|
else:
|
||||||
|
help_lines = subprocess.check_output([os_command, "--help"],
|
||||||
|
universal_newlines=True,
|
||||||
|
stderr=DEVNULL).split('\n')
|
||||||
|
|
||||||
ignore_next_lines = False
|
ignore_next_lines = False
|
||||||
next_line_screen = True
|
next_line_screen = True
|
||||||
|
@ -312,8 +317,9 @@ def generate_command(os_command, os_file):
|
||||||
next_line_screen = True
|
next_line_screen = True
|
||||||
os_file.write("</computeroutput></screen>\n")
|
os_file.write("</computeroutput></screen>\n")
|
||||||
in_screen = False
|
in_screen = False
|
||||||
format_table('Subcommands', help_lines[line_index + 2:],
|
if os_command != "glance":
|
||||||
os_file)
|
format_table('Subcommands',
|
||||||
|
help_lines[line_index + 2:], os_file)
|
||||||
continue
|
continue
|
||||||
if line.startswith(('Optional arguments:', 'Optional:',
|
if line.startswith(('Optional arguments:', 'Optional:',
|
||||||
'Options:', 'optional arguments')):
|
'Options:', 'optional arguments')):
|
||||||
|
|
Loading…
Reference in New Issue