From 4adff6a5ff92a1838f959fc8b5a18c29de205b8a Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Mon, 31 Dec 2012 14:52:57 +0000 Subject: [PATCH] PEP8 fixes. --- services/findmyiphone.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/findmyiphone.py b/services/findmyiphone.py index 79976f9..717740f 100644 --- a/services/findmyiphone.py +++ b/services/findmyiphone.py @@ -25,10 +25,11 @@ class FindMyiPhoneService(object): req = self.session.post(self._fmip_refresh_url, params=self.params) self.response = req.json() if self.response['content']: - # TODO: Support multiple devices. - self.content = self.response['content'][0] + # TODO: Support multiple devices. + self.content = self.response['content'][0] else: - raise PyiCloudNoDevicesException('You do not have any active devices.') + message = 'You do not have any active devices.' + raise PyiCloudNoDevicesException(message) self.user_info = self.response['userInfo'] def location(self): @@ -52,7 +53,7 @@ class FindMyiPhoneService(object): """ Send a request to the device to play a sound, it's possible to pass a custom message by changing the `subject`. - """ + """ self.refresh_client() data = json.dumps({'device': self.content['id'], 'subject': subject}) self.session.headers.update({'host': 'p12-fmipweb.icloud.com'})