Fixed spacing in amd-smi tool output
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I83cb040b81a4d3653417ba7399160eb81e95ce33
[ROCm/amdsmi commit: c7726bde3d]
Этот коммит содержится в:
коммит произвёл
Maisam Arif
родитель
8beb938188
Коммит
ff7c6dfa8d
@@ -33,6 +33,19 @@ from amdsmi_helpers import AMDSMIHelpers
|
||||
import amdsmi_cli_exceptions
|
||||
|
||||
|
||||
# Custom Help Formatter for increasing the action max length
|
||||
class SubparserHelpFormatter(argparse.HelpFormatter):
|
||||
def __init__(self, prog,
|
||||
indent_increment=2,
|
||||
max_help_position=24,
|
||||
width=90):
|
||||
super().__init__(prog,
|
||||
indent_increment=indent_increment,
|
||||
max_help_position=max_help_position,
|
||||
width=width)
|
||||
self._action_max_length = 20
|
||||
|
||||
|
||||
class AMDSMIParser(argparse.ArgumentParser):
|
||||
"""Unified Parser for AMDSMI CLI.
|
||||
This parser doesn't access amdsmi's lib directly,but via AMDSMIHelpers,
|
||||
@@ -56,9 +69,7 @@ class AMDSMIParser(argparse.ArgumentParser):
|
||||
|
||||
# Adjust argument parser options
|
||||
super().__init__(
|
||||
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog,
|
||||
max_help_position=80,
|
||||
width=90),
|
||||
formatter_class= lambda prog: SubparserHelpFormatter(prog),
|
||||
description=f"AMD System Management Interface | {version_string} | {platform_string}",
|
||||
add_help=True,
|
||||
prog=program_name)
|
||||
|
||||
Ссылка в новой задаче
Block a user