Skip to content

Commit a2baad1

Browse files
committed
DOMO-352334: Shortening line for my stickler friend
1 parent 984d9bf commit a2baad1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pydomo/Transport.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ def _extract_expiration(self, access_token):
100100
payload_bytes = bytes(token_parts[1], 'utf-8')
101101
# Padding required for the base64 library
102102
decoded_payload_bytes = base64.urlsafe_b64decode(payload_bytes + b'==')
103-
decoded_payload_dict = json.loads(decoded_payload_bytes.decode('utf-8'))
103+
payload_string = decoded_payload_bytes.decode('utf-8')
104+
decoded_payload_dict = json.loads(payload_string)
104105
if EXPIRATION_DATE_KEY in decoded_payload_dict.keys():
105106
expiration_date = decoded_payload_dict[EXPIRATION_DATE_KEY]
106107
self.logger.debug('Token expiration: {}'.format(expiration_date))

0 commit comments

Comments
 (0)