From f39bf5ab3104962c05b7491fd2a59f6692602e06 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sat, 23 Jan 2021 00:53:20 -0800 Subject: [PATCH] removing empty bodies from failure logs --- server-api/client-tests/web/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-api/client-tests/web/http.py b/server-api/client-tests/web/http.py index 2fccf75..50c39cb 100644 --- a/server-api/client-tests/web/http.py +++ b/server-api/client-tests/web/http.py @@ -39,7 +39,7 @@ class Response: def __write_msg(self, s): # mega dumb wrapper to reduce visual noise i think - if len(s) != 0: print(s, file=self.out) + if (len(s) == 1 or len(s) == 0) is False: print(s, file=self.out) def _log_body(self): if self.truncate_long_body: @@ -62,7 +62,7 @@ class Response: msg = self._color_failing(msg) self.__write_msg(msg) - self._log_body(f'{self.body}') + self._log_body() else: msg = f'Passing: {self.method} {self.url}' if self.color: