Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer print in Getting Started example #806

Closed
wants to merge 1 commit into from

Conversation

laundmo
Copy link

@laundmo laundmo commented Jan 23, 2024

Using the connack_string and error_string functions to print nicer messages in the Getting Started example.

Makes it easier for users to understand issues without searching for lists of these codes online

@PierreF
Copy link
Contributor

PierreF commented Jan 23, 2024

I believe this will no longer be needed with 2.0 version that is arriving soon (a pre-release is already available). With the newer version, when using the CallbackAPI version 2, it's no longer an integer rc that is received but an ReasonCodes instance, which is printed as string.

Not everything is well aligned currently: master branch contains the development branch with latest change (the 2.0 version) but the README is not yet updated. See #804 for README matching version 2.0

So the getting started will result in:

>>>  print(f"Connected with result code {reason_code}")
Connected with result code Success

@PierreF
Copy link
Contributor

PierreF commented Mar 24, 2024

Closing as I believe the issue is fixed with latest release. Feel free to re-open if you still have an issue.

@PierreF PierreF closed this Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants