X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVatHistory.py;h=ffc1644f1b1043cdfa7e2f2c066cbcc5d6fb1b18;hp=e273746f9b2d6b76b56e09b924316065902c1d11;hb=b4e5c717f5e2c39ded81f0c6f7b0f9f61945befd;hpb=0ad00a491e7c39f126abcd087bc2743dbdc3a1af diff --git a/resources/libraries/python/VatHistory.py b/resources/libraries/python/VatHistory.py index e273746f9b..ffc1644f1b 100644 --- a/resources/libraries/python/VatHistory.py +++ b/resources/libraries/python/VatHistory.py @@ -71,12 +71,12 @@ class VatHistory(object): :type node: dict """ if node['type'] == NodeType.DUT: - sequence = "\nno VAT command executed"\ - if len(DICT__DUTS_VAT_HISTORY[node['host']]) == 0\ - else "".join("\n{}".format(cmd) - for cmd in DICT__DUTS_VAT_HISTORY[node['host']]) - logger.trace("{0} VAT command history:{1}\n". - format(node['host'], sequence)) + sequence = "\nno VAT command executed" + if DICT__DUTS_VAT_HISTORY[node['host']]: + sequence = "".join(["\n{}".format( + cmd) for cmd in DICT__DUTS_VAT_HISTORY[node['host']]]) + logger.trace( + "{0} VAT command history:{1}\n".format(node['host'], sequence)) @staticmethod def show_vat_history_on_all_duts(nodes):