From 53b435aa00f6bca64ecc2f0545b19b99d595ecba Mon Sep 17 00:00:00 2001 From: cockroacher <163405488+cockroacher@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:09:08 +0100 Subject: [PATCH] Sitespeed Based Tests - Crashed if file was found instead of directory --- tests/sitespeed_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sitespeed_base.py b/tests/sitespeed_base.py index 202412c3..eb95746d 100644 --- a/tests/sitespeed_base.py +++ b/tests/sitespeed_base.py @@ -449,6 +449,9 @@ def get_browsertime_har_path(parent_path): if not os.path.exists(parent_path): return '' + if not os.path.isdir(parent_path): + return '' + sub_dirs = os.listdir(parent_path) if 'browsertime.har' in sub_dirs: return os.path.join(parent_path, 'browsertime.har')