Should an instance key not be returned, generate a UUID instead. Fixes #9.
This commit is contained in:
parent
7ee870c329
commit
47f7c71b1b
1 changed files with 1 additions and 1 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()})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue