Skip to content

Commit

Permalink
1.2.7
Browse files Browse the repository at this point in the history
Add fix for 450 error after a period of time only occurs for MyOwnDevices...

1.2.6

Continued work.
Readded/New Device = MyDevices == the logged in accounts Devices
Add 2 new action groups play Sound and send Message == to send to your own devices..
(Title currently doesnt seem to change; but message does)
Rejig some fields
Delete unneeded files
Updated WazeRouteCalculator.py

1.2.5

Add Delete All Account Data Button - at very bottom below the Debugging info.  Removes any cookie/session data that may have been saved.
Change webservice for FindmyFriends
Remove MyOwn Device no longer supported
  • Loading branch information
Ghawken committed Sep 26, 2021
1 parent 84e309c commit a92d8c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion iFindFriendsMini.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>1.2.6</string>
<string>1.2.7</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>CFBundleDisplayName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,25 @@ def request(self, method, url, **kwargs): # pylint: disable=arguments-differ

if not response.ok and (content_type not in json_mimetypes
or response.status_code in [421, 450, 500]):
try:
if has_retried is None and response.status_code == 450:
# Handle re-authentication for Find My iPhone
LOGGER.debug("Re-authenticating Find My iPhone service")
try:
self.service.authenticate(True)
except PyiCloudAPIResponseException:
LOGGER.debug("Re-authentication failed")
kwargs["retried"] = True
return self.request(method, url, **kwargs)
except Exception:
pass

if has_retried is None and response.status_code in [421, 450, 500]:
api_error = PyiCloudAPIResponseException( response.reason, response.status_code, retry=True )
request_logger.debug(api_error)
kwargs["retried"] = True
return self.request(method, url, **kwargs)

self._raise_error(response.status_code, response.reason)

if content_type not in json_mimetypes:
Expand Down

0 comments on commit a92d8c9

Please sign in to comment.