]> git.puffer.fish Git - matthieu/frr.git/commitdiff
topotest: json_cmp_result split error lines
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 19 Sep 2017 20:05:07 +0000 (17:05 -0300)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:12 +0000 (20:22 -0500)
When the API user wanted to show newlines we have to break them manually
to get the propper format.

tests/topotests/lib/topotest.py

index 8063598ebaf83bcf89b6e30b1dd47f32161192cb..5dbef7432fb7cda50af9d6bc97381c8164e83f91 100644 (file)
@@ -51,7 +51,8 @@ class json_cmp_result(object):
 
     def add_error(self, error):
         "Append error message to the result"
-        self.errors.append(error)
+        for line in error.splitlines():
+            self.errors.append(line)
 
     def has_errors(self):
         "Returns True if there were errors, otherwise False."