From 47f7c71b1b68505e7a0c72c4302224058f7ddc49 Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Fri, 11 Oct 2013 18:10:19 -0700 Subject: [PATCH 1/2] Should an instance key not be returned, generate a UUID instead. Fixes #9. --- pyicloud/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyicloud/base.py b/pyicloud/base.py index c7becd5..e700c73 100644 --- a/pyicloud/base.py +++ b/pyicloud/base.py @@ -63,7 +63,7 @@ class PyiCloudService(object): if 'dsInfo' in resp: dsid = resp['dsInfo']['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) self.params.update({'id': sha.hexdigest().upper()}) From c31c23f2b110f693d4c68a90cdd5c47cb38ebebd Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Fri, 11 Oct 2013 18:11:24 -0700 Subject: [PATCH 2/2] Bumping patch version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b7bda01..139a6b7 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('requirements.txt') as f: setup( name='pyicloud', - version='0.2', + version='0.2.1', url='https://github.com/picklepete/pyicloud', description=( 'PyiCloud is a module which allows pythonistas to '