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()}) 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 '