From: Lou Berger Date: Thu, 7 Dec 2017 21:18:54 +0000 (-0500) Subject: lib: lutil - make requested error logging change X-Git-Tag: frr-7.1-dev~151^2~183 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=2fdcc342505ed30e1a40005ae970e0711ab76b15;p=mirror%2Ffrr.git lib: lutil - make requested error logging change Signed-off-by: Lou Berger --- 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__':