summaryrefslogtreecommitdiff
blob: 027c3df18ad2eb5b0b8a6bf6a72f815de0e7b64b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From f360741dec76a9c9d831f0b547596891ea321599 Mon Sep 17 00:00:00 2001
From: James Browning <jamesb.fe80@gmail.com>
Date: Sun, 10 Apr 2022 16:23:34 -0700
Subject: [PATCH] clean test output up in Python 3

---
 wafhelpers/test.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/wafhelpers/test.py b/wafhelpers/test.py
index 9351a5675..6bba34881 100644
--- a/wafhelpers/test.py
+++ b/wafhelpers/test.py
@@ -31,12 +31,13 @@ def test_print_log(ctx):
         pprint("YELLOW", "RETURN VALUE:", retval)
         print("")
 
-        if retval or error:
+        if retval:
             pprint("RED", "****** ERROR ******\n")
 
-            print(error or lines)
+            print(polystr(error) or polystr(lines))
 
-        if (not retval) and (not error):
-            pprint("GREEN", "****** LOG ******\n", lines)
+        else:
+            pprint("GREEN", "****** LOG ******\n",
+                   polystr(lines), polystr(error))
 
         print("")
-- 
2.32.0