Skip to content

Commit

Permalink
Cope with session file format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davipt authored and NyaMisty committed Feb 8, 2024
1 parent ecf2e0a commit abfdb3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Expand Up @@ -270,9 +270,10 @@ def handle_iTunes_provider(url):
session_cache = os.path.join(args.session_dir, args.appleid) if args.session_dir else None
if session_cache and os.path.exists(session_cache):
needLogin = False
with open(session_cache, "r") as f:
content = f.read()
try:
# inside try in case the file format changed
with open(session_cache, "r") as f:
content = f.read()
Store.authenticate_load_session(content)
except Exception as e:
logger.warning(f"Error loading session {session_cache}")
Expand Down

0 comments on commit abfdb3a

Please sign in to comment.