From: Rafael Zalamena Date: Tue, 19 Sep 2017 20:05:07 +0000 (-0300) Subject: topotest: json_cmp_result split error lines X-Git-Tag: frr-7.1-dev~151^2~208 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=2db5888df5751d8432af97e9dfc26e91ded950fa;p=mirror%2Ffrr.git topotest: json_cmp_result split error lines When the API user wanted to show newlines we have to break them manually to get the propper format. --- diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 8063598eba..5dbef7432f 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -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."