petretiandrea / plugp100

Work in progress implementation of tapo protocol in python.
GNU General Public License v3.0
72 stars 28 forks source link

Update version and improve logging in klap_protocol #180

Open BayernMuller opened 8 months ago

BayernMuller commented 8 months ago

This PR includes two primary changes to the plugp100 library:

Version Update in init.py: The version number has been incremented from 4.0.3 to 4.0.4. This change signifies an incremental improvement or fix in the library, adhering to semantic versioning principles.

Logging Improvement in klap_protocol.py: We've made a modification in the logging statement within the KlapProtocol class. Previously, the logging of a specific error message used string concatenation to include the IP address in the message. This has been updated to use f-string formatting, which is more efficient and readable. The revised message now provides clearer insight when the server's response does not match the expected hash but matches an authentication with blank credentials.

Motivation:

The motivation behind these changes is twofold. First, incrementing the version number allows users of the library to distinguish this new set of changes from previous versions. Second, improving the logging statement enhances the debuggability of the library by providing more concise and readable logs, especially in scenarios where authentication anomalies occur.

Impact:

These changes are expected to improve the overall user experience of the library by providing clearer logs and marking an incremental update that may include fixes or minor enhancements. The update in versioning also helps in better managing the library's versions and dependencies for users and developers alike.