Skip to content

Commit

Permalink
Merge pull request #941 from jrhunger/pin-issues
Browse files Browse the repository at this point in the history
Pin issues
  • Loading branch information
fronzbot authored Jun 8, 2024
2 parents 8e578ae + d60076c commit 3057783
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit 3057783

Please sign in to comment.