hthiery / python-fritzhome

Python Library to access AVM Fritz!Box homeautomation
MIT License
52 stars 37 forks source link

Pass through connection error also during login #84

Closed mib1185 closed 1 year ago

mib1185 commented 1 year ago

Currently any exception occur during login, will cause a LoginError, even it is an connection error.

With this change it is ensured, that every exception (except the defined LoginError) is passed through (like every other method does in this lib), those the user can differentiate if the credentials are wrong or a connection issue occured.

coveralls commented 1 year ago

Coverage Status

coverage: 92.485% (+0.07%) from 92.411% when pulling 794dc3b1810c3edd5cedc2793df19ffa45697c6b on mib1185:pass-through-connection-error-during-login into faf67f486db582b5d6ebcc502b92a0096857d75f on hthiery:master.

mib1185 commented 1 year ago

Hi @hthiery I know it's still the vacation season, but maybe you will find some time for a review on this 🙂

hthiery commented 1 year ago

Could you please give a short explanation why this change is needed and could you please meld the commits into one (rebase)? Otherwise the change looks good to me.

mib1185 commented 1 year ago

In current state, every occuring issue will result in LoginError, even a connection issue.

With this change, only real login issues (wrong credentials, those failing login) will cause a LoginError, everything else (eq. ConnectionError or ConnectTimeout) will be passed through. So the consumer of this library is able to differentiate if the credentials are wrong or the Fritzbox is not reachable.

a rebase will not merge all commits into one, but this can easily be done by using "squash and merge"

hthiery commented 1 year ago

Good explanation. Are you able to add these explanation to the commit message and while on it combine your changes into one commit and then do a force push to your branch? Thank you

mib1185 commented 1 year ago

Good explanation. Are you able to add these explanation to the commit message and while on it combine your changes into one commit and then do a force push to your branch? Thank you

done. Please don't get me wrong, but why not just squash the commits during merge? so the single commits will still be available in the pull request, but in the master branch you only will have one commit which contains all changes of the pull request. Even the commit message can be adjusted as needed during "squash and merge" operation

hthiery commented 1 year ago

The request was more about the explanation in the commit message not squashing the commits.

hthiery commented 1 year ago

thank you

mib1185 commented 1 year ago

Hi @hthiery Would be great if could do a new release 🙂

hthiery commented 1 year ago

Hi @hthiery Would be great if could do a new release slightly_smiling_face

0.6.9 tagged and released