Merge pull request #136 from einsteinx2/issue/88-macos-keychain-broken-python3

Fixed macOS keychain access when using Python 3
This commit is contained in:
Jose Diaz-Gonzalez
2020-01-07 11:44:36 -05:00
committed by GitHub

View File

@@ -337,6 +337,8 @@ def get_auth(args, encode=True):
'-s', args.osx_keychain_item_name, '-s', args.osx_keychain_item_name,
'-a', args.osx_keychain_item_account, '-a', args.osx_keychain_item_account,
'-w'], stderr=devnull).strip()) '-w'], stderr=devnull).strip())
if not PY2:
token = token.decode('utf-8')
auth = token + ':' + 'x-oauth-basic' auth = token + ':' + 'x-oauth-basic'
except: except:
log_error('No password item matching the provided name and account could be found in the osx keychain.') log_error('No password item matching the provided name and account could be found in the osx keychain.')