Merge pull request #10 from latestrevision/ios-authentication-bugfix
Should an instance key not be returned, generate a UUID instead. Fixes #9.
This commit is contained in:
commit
cdb72ec63b
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ class PyiCloudService(object):
|
||||||
if 'dsInfo' in resp:
|
if 'dsInfo' in resp:
|
||||||
dsid = resp['dsInfo']['dsid']
|
dsid = resp['dsInfo']['dsid']
|
||||||
self.params.update({'dsid': dsid})
|
self.params.update({'dsid': dsid})
|
||||||
instance = resp['instance']
|
instance = resp.get('instance', uuid.uuid4().hex)
|
||||||
sha = hashlib.sha1(self.user.get('apple_id') + instance)
|
sha = hashlib.sha1(self.user.get('apple_id') + instance)
|
||||||
self.params.update({'id': sha.hexdigest().upper()})
|
self.params.update({'id': sha.hexdigest().upper()})
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open('requirements.txt') as f:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pyicloud',
|
name='pyicloud',
|
||||||
version='0.2',
|
version='0.2.1',
|
||||||
url='https://github.com/picklepete/pyicloud',
|
url='https://github.com/picklepete/pyicloud',
|
||||||
description=(
|
description=(
|
||||||
'PyiCloud is a module which allows pythonistas to '
|
'PyiCloud is a module which allows pythonistas to '
|
||||||
|
|
Loading…
Reference in a new issue