X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVatHistory.py;h=ffc1644f1b1043cdfa7e2f2c066cbcc5d6fb1b18;hb=4b84a3d0620c827aa9bc9c36776af50a88a180f4;hp=e273746f9b2d6b76b56e09b924316065902c1d11;hpb=44cafa8a265cfb1144638430079ef4dbf2501d72;p=csit.git 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):