removing empty bodies from failure logs

This commit is contained in:
shockrah 2021-01-23 00:53:20 -08:00
parent 915c73b922
commit f39bf5ab31

View File

@ -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: