From fc7e67dd090d673464b182cbca5f723e7b410214 Mon Sep 17 00:00:00 2001 From: JJTech0130 Date: Wed, 9 Aug 2023 12:38:09 -0400 Subject: [PATCH] ignore urllib3 warnings without gsa.py turning them off --- demo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demo.py b/demo.py index b9793d0..ef522ff 100644 --- a/demo.py +++ b/demo.py @@ -18,6 +18,7 @@ logging.basicConfig( # Set sane log levels logging.getLogger("urllib3").setLevel(logging.WARNING) +logging.getLogger("py.warnings").setLevel(logging.ERROR) # Ignore warnings from urllib3 logging.getLogger("asyncio").setLevel(logging.WARNING) logging.getLogger("jelly").setLevel(logging.INFO) logging.getLogger("nac").setLevel(logging.INFO) @@ -27,6 +28,8 @@ logging.getLogger("ids").setLevel(logging.DEBUG) logging.getLogger("bags").setLevel(logging.INFO) logging.getLogger("imessage").setLevel(logging.DEBUG) +logging.captureWarnings(True) + # Try and load config.json try: with open("config.json", "r") as f: