mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-06 16:38:03 +01:00
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:
@@ -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.')
|
||||||
|
|||||||
Reference in New Issue
Block a user