From a79911619f78d6b7a9c5cddcc9c274dbaf4b3de5 Mon Sep 17 00:00:00 2001 From: Lev Plyusnin Date: Wed, 7 Jun 2023 08:23:48 +0700 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=20xml-=D0=BE?= =?UTF-8?q?=D1=82=D0=B2=D0=B5=D1=82=D0=BE=D0=B2=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20loglevel.DEBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f2e7036..e226d87 100644 --- a/main.py +++ b/main.py @@ -394,7 +394,8 @@ if __name__ == '__main__': def response_hook(resp, *_args, **_kwargs): if logging.root.isEnabledFor(logging.DEBUG): - if 'application/json' in resp.headers['Content-Type']: + target_headers = ['application/json', 'text/xml'] + if any(h in resp.headers['Content-Type'] for h in target_headers): logging.debug(resp.text) time.sleep(args.delay)