Skip to content

Commit

Permalink
If _resourceType is missing from har file (e.g. when using a recordin…
Browse files Browse the repository at this point in the history
…g done with Firefox), assume resource type is "other" instead of crashing.
  • Loading branch information
cyberw committed Dec 5, 2023
1 parent 7dc99d7 commit d515e57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion har2locust/default_plugins/1_resourcefilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def process(entries, args):
if unsupported := set(resource_types) - supported_resource_type:
raise NotImplementedError(f"{unsupported} resource types are not supported")

entries[:] = [e for e in entries if e["_resourceType"] in resource_types]
entries[:] = [e for e in entries if e.get("_resourceType", "other") in resource_types]

0 comments on commit d515e57

Please sign in to comment.