|
4 | 4 | __author__ = 'Simon Robinson' |
5 | 5 | __copyright__ = 'Copyright (c) 2022 Simon Robinson' |
6 | 6 | __license__ = 'Apache 2.0' |
7 | | -__version__ = '2022-06-13' # ISO 8601 (YYYY-MM-DD) |
| 7 | +__version__ = '2022-07-09' # ISO 8601 (YYYY-MM-DD) |
8 | 8 |
|
9 | 9 | import argparse |
10 | 10 | import asyncore |
@@ -304,8 +304,8 @@ def get_oauth2_credentials(username, password, connection_info, recurse_retries= |
304 | 304 | permission_url = OAuth2Helper.construct_oauth2_permission_url(permission_url, redirect_uri, client_id, |
305 | 305 | oauth2_scope, username) |
306 | 306 | # note: get_oauth2_authorisation_code is a blocking call |
307 | | - (success, authorisation_code) = OAuth2Helper.get_oauth2_authorisation_code(permission_url, redirect_uri, |
308 | | - username, connection_info) |
| 307 | + success, authorisation_code = OAuth2Helper.get_oauth2_authorisation_code(permission_url, redirect_uri, |
| 308 | + username, connection_info) |
309 | 309 | if not success: |
310 | 310 | Log.info('Authentication request failed or expired for account', username, '- aborting login') |
311 | 311 | return False, '%s: Login failed - the authentication request expired or was cancelled for ' \ |
@@ -542,7 +542,7 @@ def decode_credentials(str_data): |
542 | 542 | """Decode credentials passed as a base64-encoded string: [some data we don't need]\x00username\x00password""" |
543 | 543 | try: |
544 | 544 | # formal syntax: https://tools.ietf.org/html/rfc4616#section-2 |
545 | | - (_, bytes_username, bytes_password) = base64.b64decode(str_data).split(b'\x00') |
| 545 | + _, bytes_username, bytes_password = base64.b64decode(str_data).split(b'\x00') |
546 | 546 | return bytes_username.decode('utf-8'), bytes_password.decode('utf-8') |
547 | 547 | except (ValueError, binascii.Error): |
548 | 548 | # ValueError is from incorrect number of arguments; binascii.Error from incorrect encoding |
|
0 commit comments