Change-Id: Id86f8630ff37e958d90011f421aeb8a75b3e4783
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
:param node: DUT node to show PAPI command history for.
:type node: dict
"""
:param node: DUT node to show PAPI command history for.
:type node: dict
"""
- history = "\nNo PAPI command executed"
- if DICT__DUTS_PAPI_HISTORY[node['host']]:
- history = "".join(["\n{}".format(
- cmd) for cmd in DICT__DUTS_PAPI_HISTORY[node['host']]])
+ history_list = DICT__DUTS_PAPI_HISTORY[node['host']]
+ if not history_list:
+ history_list = ("No PAPI command executed", )
- "{0} PAPI command history:\n{1}\n".format(node['host'], history))
+ "{0} PAPI command history:\n{1}\n".format(
+ node['host'], "\n".join(history_list)))
@staticmethod
def show_papi_history_on_all_duts(nodes):
@staticmethod
def show_papi_history_on_all_duts(nodes):