Browse Source

Handle 'MILCInterface' object has no attribute 'log_level' error (#24549)

Joel Challis 1 year ago
parent
commit
465cbc87de
1 changed files with 5 additions and 2 deletions
  1. 5 2
      lib/python/qmk/search.py

+ 5 - 2
lib/python/qmk/search.py

@@ -119,8 +119,11 @@ def filter_help() -> str:
 
 def _set_log_level(level):
     cli.acquire_lock()
-    old = cli.log_level
-    cli.log_level = level
+    try:
+        old = cli.log_level
+        cli.log_level = level
+    except AttributeError:
+        old = cli.log.level
     cli.log.setLevel(level)
     logging.root.setLevel(level)
     cli.release_lock()