Skip to content

Commit

Permalink
Bug 1782098 - specify the utf-8 encoding when opening a local profile…
Browse files Browse the repository at this point in the history
… to symbolicate it, r=mstange,perftest-reviewers,sparky.

Differential Revision: https://phabricator.services.mozilla.com/D153103
  • Loading branch information
fqueze committed Aug 2, 2022
1 parent 7c4732f commit 80cd7c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def symbolicate_profile_json(profile_path, objdir_path):
)

try:
with open(profile_path, "r") as profile_file:
with open(profile_path, "r", encoding="utf-8") as profile_file:
profile = json.load(profile_file)
symbolicator.dump_and_integrate_missing_symbols(profile, missing_symbols_zip)
symbolicator.symbolicate_profile(profile)
Expand Down
2 changes: 1 addition & 1 deletion testing/raptor/raptor/gecko_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _open_gecko_profile(self, profile_path):
with gzip.open(profile_path, "r") as profile_file:
profile = json.load(profile_file)
else:
with open(profile_path, "r") as profile_file:
with open(profile_path, "r", encoding="utf-8") as profile_file:
profile = json.load(profile_file)
return profile

Expand Down
2 changes: 1 addition & 1 deletion testing/talos/talos/gecko_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _save_gecko_profile(
self, cycle, symbolicator, missing_symbols_zip, profile_path
):
try:
with open(profile_path, "r") as profile_file:
with open(profile_path, "r", encoding="utf-8") as profile_file:
profile = json.load(profile_file)
symbolicator.dump_and_integrate_missing_symbols(
profile, missing_symbols_zip
Expand Down

0 comments on commit 80cd7c4

Please sign in to comment.