We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6fe4788 + 9847120 commit 8f00a1cCopy full SHA for 8f00a1c
tidalapi/session.py
@@ -631,14 +631,14 @@ def save_session_to_file(self, session_file: Path):
631
"is_pkce": {"data": self.is_pkce},
632
# "expiry_time": {"data": self.expiry_time},
633
}
634
- with session_file.open("w") as outfile:
635
- json.dump(data, outfile)
+ with session_file.open("w") as file:
+ json.dump(data, file)
636
637
def load_session_from_file(self, session_file: Path):
638
try:
639
- with open(session_file) as f:
+ with session_file.open("r") as file:
640
log.info("Loading session from %s...", session_file)
641
- data = json.load(f)
+ data = json.load(file)
642
except Exception as e:
643
log.info("Could not load session from %s: %s", session_file, e)
644
return False
0 commit comments