]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: lutil - make requested error logging change
authorLou Berger <lberger@labn.net>
Thu, 7 Dec 2017 21:18:54 +0000 (16:18 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:12 +0000 (20:22 -0500)
Signed-off-by: Lou Berger <lberger@labn.net>
tests/topotests/lib/lutil.py

index ad9932a72e9009f95b307fb919c0e9861f9e0643..5fbd7cd895900aef781f85e074bfa90cc5e4d42e 100755 (executable)
@@ -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__':