From e45984b49c6b7d903610f41bd02b06511af63108 Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Sat, 10 Jan 2015 11:21:30 -0800 Subject: [PATCH] Minor style changes. --- pyicloud/services/findmyiphone.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pyicloud/services/findmyiphone.py b/pyicloud/services/findmyiphone.py index e3e8564..1d9971c 100755 --- a/pyicloud/services/findmyiphone.py +++ b/pyicloud/services/findmyiphone.py @@ -35,7 +35,19 @@ class FindMyiPhoneServiceManager(object): """ host = self._service_root.split('//')[1].split(':')[0] self.session.headers.update({'host': host}) - req = self.session.post(self._fmip_refresh_url, params=self.params, data='{"clientContext":{"fmly":true,"shouldLocate":true,"selectedDevice":"all"}}') + req = self.session.post( + self._fmip_refresh_url, + params=self.params, + data=json.dumps( + { + 'clientContext': { + 'fmly': True, + 'shouldLocate': True, + 'selectedDevice': 'all', + } + } + ) + ) self.response = req.json() for device_info in self.response['content']: