Skip to content

Commit

Permalink
Sitespeed Based Tests - Crashed if file was found instead of directory
Browse files Browse the repository at this point in the history
  • Loading branch information
cockroacher authored Jan 29, 2025
1 parent f4c1998 commit 53b435a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/sitespeed_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 53b435a

Please sign in to comment.