pi-top / pi-top-Python-SDK

pi-top's Python SDK (pitop package)
Apache License 2.0
27 stars 4 forks source link

Handle errors when reading leased IPs #586

Closed jcapona closed 1 year ago

jcapona commented 1 year ago

Main changes

On first boot we continuously try to get the IP address of connected devices via USB or AP. This sometimes fails because the file with the leases doesn't exist yet. The changes in this PR handle that case, returning an empty string, which means that no IP lease exist at the moment.

Screenshots (feature, test output, profiling, dev tools etc)

[insert screenshots here]

Other notes (e.g. implementation quirks, edge cases, questions / issues)

-

Manual testing tips

-

Tag anyone who definitely needs to review or help

-

codecov[bot] commented 1 year ago

Codecov Report

Base: 60.51% // Head: 60.50% // Decreases project coverage by -0.00% :warning:

Coverage data is based on head (59d7dae) compared to base (dba70a9). Patch coverage: 57.14% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #586 +/- ## ========================================== - Coverage 60.51% 60.50% -0.01% ========================================== Files 147 147 Lines 7311 7317 +6 ========================================== + Hits 4424 4427 +3 - Misses 2887 2890 +3 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `60.50% <57.14%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/586?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top) | Coverage Δ | | |---|---|---| | [packages/common/pitop/common/sys\_info.py](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/586/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#diff-cGFja2FnZXMvY29tbW9uL3BpdG9wL2NvbW1vbi9zeXNfaW5mby5weQ==) | `83.68% <57.14%> (-1.10%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.