Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin issues #941

Merged
merged 4 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions blinkpy/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def extract_login_info(self):
self.token = self.login_response["auth"]["token"]
self.client_id = self.login_response["account"]["client_id"]
self.account_id = self.login_response["account"]["account_id"]
self.user_id = self.login_response["account"].get("user_id", None)

async def startup(self):
"""Initialize tokens for communication."""
Expand Down
4 changes: 2 additions & 2 deletions blinkpy/blinkpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ async def setup_owls(self):
network_list.append(str(network_id))
self.sync[name] = BlinkOwl(self, name, network_id, owl)
await self.sync[name].start()
except KeyError:
except (KeyError, TypeError):
# No sync-less devices found
pass

Expand Down Expand Up @@ -222,7 +222,7 @@ async def setup_lotus(self):
network_list.append(str(network_id))
self.sync[name] = BlinkLotus(self, name, network_id, lotus)
await self.sync[name].start()
except KeyError:
except (KeyError, TypeError):
# No sync-less devices found
pass

Expand Down
1 change: 1 addition & 0 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ async def test_refresh_token(self, mock_resp):
self.assertEqual(self.auth.token, "foobar")
self.assertEqual(self.auth.client_id, 1234)
self.assertEqual(self.auth.account_id, 5678)
self.assertEqual(self.auth.user_id, None)

mock_resp.return_value.status = 400
with self.assertRaises(TokenRefreshFailed):
Expand Down
Loading