removing empty bodies from failure logs
This commit is contained in:
parent
915c73b922
commit
f39bf5ab31
@ -39,7 +39,7 @@ class Response:
|
|||||||
|
|
||||||
def __write_msg(self, s):
|
def __write_msg(self, s):
|
||||||
# mega dumb wrapper to reduce visual noise i think
|
# 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):
|
def _log_body(self):
|
||||||
if self.truncate_long_body:
|
if self.truncate_long_body:
|
||||||
@ -62,7 +62,7 @@ class Response:
|
|||||||
msg = self._color_failing(msg)
|
msg = self._color_failing(msg)
|
||||||
|
|
||||||
self.__write_msg(msg)
|
self.__write_msg(msg)
|
||||||
self._log_body(f'{self.body}')
|
self._log_body()
|
||||||
else:
|
else:
|
||||||
msg = f'Passing: {self.method} {self.url}'
|
msg = f'Passing: {self.method} {self.url}'
|
||||||
if self.color:
|
if self.color:
|
||||||
|
Loading…
Reference in New Issue
Block a user