Skip to content

Commit

Permalink
Update __init__.py (#189)
Browse files Browse the repository at this point in the history
Fixes Firefox json_data load, closes #188
  • Loading branch information
kartiksubbarao authored Jul 17, 2023
1 parent 3ce9776 commit 53fa5e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion browser_cookie3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,8 @@ def __add_session_cookies(self, cj):
if not os.path.exists(self.session_file):
return
try:
json_data = json.load(self.session_file)
with open(self.session_file, 'rb') as file_obj:
json_data = json.load(file_obj)
except ValueError as e:
print(f'Error parsing {self.browser_name} session JSON:', str(e))
else:
Expand Down

0 comments on commit 53fa5e3

Please sign in to comment.