Skip to content

Commit

Permalink
fix(library_test): add cloud login (#190)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Added a check to ensure successful login to the cloud service before
retrieving keys, with an error message and script exit if login fails.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Lucas Mindêllo de Andrade <lucas@mindello.com.br>
  • Loading branch information
chemelli74 and rokam authored Jul 1, 2024
1 parent feb855f commit 8ad314e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ async def main() -> None:
)
cloud_keys = {}
if cloud:
if not await cloud.login():
print("ERROR: cannot login")
sys.exit(2)
cloud_keys = await cloud.get_keys(first_device["device_id"])
print("-" * 20)
print("Fist device Cloud info: ", cloud_keys)
Expand Down

0 comments on commit 8ad314e

Please sign in to comment.