From 2fdcc342505ed30e1a40005ae970e0711ab76b15 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 7 Dec 2017 16:18:54 -0500 Subject: [PATCH] lib: lutil - make requested error logging change Signed-off-by: Lou Berger --- tests/topotests/lib/lutil.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/topotests/lib/lutil.py b/tests/topotests/lib/lutil.py index ad9932a72e..5fbd7cd895 100755 --- a/tests/topotests/lib/lutil.py +++ b/tests/topotests/lib/lutil.py @@ -21,6 +21,7 @@ import re import sys import time import datetime +from topolog import logger from mininet.net import Mininet @@ -263,16 +264,14 @@ def luNumPass(): def luShowFail(): printed = 0 - print("Showing error summary from See %s" % LUtil.fsum_name) sf = open(LUtil.fsum_name, 'r') for line in sf: if line[-2] != "0": printed+=1 - sys.stdout.write(line) - sys.stdout.flush() + logger.error(line.rstrip()) sf.close() if printed > 0: - print("See %s for details of errors" % LUtil.fout_name) + logger.error("See %s for details of errors" % LUtil.fout_name) #for testing if __name__ == '__main__': -- 2.39.5