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

cli: Fix cmd_parameter generation for nested for python 3.9 #205

Merged

Conversation

PetePriority
Copy link
Contributor

I noticed that when running the CLI with python 3.9, the type_target enum would be converted to a string representation of the enum, instead to its numerical value, i.e., MfcKeyType.A instead of 96. This caused the execution of the nested binary to fail.

Signed-off-by: Peter-Simon Dieterich <peter-simon.dieterich@vaillant-group.com>
Copy link

You are welcome to add an entry to the CHANGELOG.md as well

Copy link

Built artifacts for commit acb353f

Firmware

Client

@xianglin1998
Copy link
Contributor

How does this change work on non 3.9 versions of Python?

@PetePriority
Copy link
Contributor Author

It still works on python 3.11.8.
But this is expected: the nested binaries expect an integer as their argument. So int(type_target) makes sure the enum is converted to an int before the implicit conversion to a string in the format string f"...{int(type_target)}..."

@xianglin1998 xianglin1998 merged commit 22b7898 into RfidResearchGroup:main Mar 13, 2024
8 checks passed
@xianglin1998
Copy link
Contributor

Good!!!

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.

2 participants