Skip to content

Commit

Permalink
Fix weird mypy issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Feb 27, 2024
1 parent 9856d2e commit da4e0e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1773,12 +1773,12 @@ def parse_findaway(
checkoutId = k("FNDTransactionID", parsed)

if sessionKey == "Expired":
if license_pool.identifier is None:
identifier = f"LicensePool {license_pool.id}"
else:
identifier = f"{license_pool.identifier.type}/{license_pool.identifier.identifier}"
try:
identifier_msg = f"{license_pool.identifier.type}/{license_pool.identifier.identifier}"
except AttributeError:
identifier_msg = f"LicensePool.id {license_pool.id}"

message = f"Expired findaway session key for {identifier}. Request data: {json.dumps(parsed)}"
message = f"Expired findaway session key for {identifier_msg}. Request data: {json.dumps(parsed)}"
self.log.error(message)
raise RemoteInitiatedServerError(
message,
Expand Down

0 comments on commit da4e0e9

Please sign in to comment.