mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
fix: greedy regex in get_render_devices swallows BlenderKit log output
Changed regex from greedy [\s\S]* to non-greedy .*? with re.DOTALL so it stops at the first ] (the end of the GPU data JSON array) instead of matching through timestamped log lines like [19:36:22.109, __init__.py:2881] that contain trailing brackets.
This commit is contained in:
@@ -173,7 +173,7 @@ class Blender(BaseRenderEngine):
|
||||
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'get_system_info.py')
|
||||
results = self.run_python_script(script_path=script_path)
|
||||
output = results.stdout.decode()
|
||||
match = re.search(r"GPU DATA:(\[[\s\S]*\])", output)
|
||||
match = re.search(r"GPU DATA:(\[.*?\])", output, re.DOTALL)
|
||||
if match:
|
||||
gpu_data_json = match.group(1)
|
||||
gpus_info = json.loads(gpu_data_json)
|
||||
|
||||
Reference in New Issue
Block a user