zigpy / bellows

A Python 3 project to implement EZSP for EmberZNet devices
GNU General Public License v3.0
177 stars 87 forks source link

Updated formNetwork error handling in backup command #562

Closed LaG1924 closed 1 year ago

LaG1924 commented 1 year ago

Changes from #554 give me the error described in #561. This PR closes #561 and updates the code in the "backup" cli command to make it compatible with the updated ezsp.formNetwork/ezsp.leaveNetwork methods that now return None.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f1fba64) 99.76% compared to head (3998944) 99.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #562 +/- ## ======================================= Coverage 99.76% 99.76% ======================================= Files 62 62 Lines 4594 4594 ======================================= Hits 4583 4583 Misses 11 11 ``` | [Impacted Files](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [bellows/ezsp/config.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL2NvbmZpZy5weQ==) | `100.00% <ø> (ø)` | | | [bellows/ezsp/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL19faW5pdF9fLnB5) | `99.17% <100.00%> (ø)` | | | [bellows/ezsp/protocol.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Byb3RvY29sLnB5) | `97.29% <100.00%> (ø)` | | | [bellows/ezsp/v10/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3YxMC9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/v11/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3YxMS9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/v4/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y0L19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/v5/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y1L19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/v6/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y2L19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/v7/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y3L19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [bellows/ezsp/v8/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL3Y4L19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | ... and [1 more](https://app.codecov.io/gh/zigpy/bellows/pull/562?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | |

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

puddly commented 1 year ago

Thanks for the PR!

Currently, the radio-specific network management commands are deprecated in favor of https://github.com/zigpy/zigpy-cli#network-commands. They do roughly the same thing but the latter is the only maintained API.

LaG1924 commented 1 year ago

Is the real problem just an outdated guide? If yes, then you can close this PR and issue.

P.S. I hope someone will update the guide one day.