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

Fixed ValueError when setting enum properties #4

Merged
merged 2 commits into from
May 21, 2019
Merged

Fixed ValueError when setting enum properties #4

merged 2 commits into from
May 21, 2019

Conversation

vkribo
Copy link
Contributor

@vkribo vkribo commented May 20, 2019

In setter of an enum property there must be a cast of value to int.

Code:
conn = krpc.connect()
mj = conn.mech_jeb
smart_ass = mj.smart_ass
smart_ass.autopilot_mode = mj.SmartASSAutopilotMode.surface

Assigning to the autopilot_mode property was causing ValueError.
The same thing happens with other enum properties.

Copy link
Owner

@Genhis Genhis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :-)
Can you add a changelog entry with your pull request link in brackets?

Something like

### Fixed
- <text here> ([#4](https://github.com/Genhis/KRPC.MechJeb/pull/4))

@Genhis Genhis added the bug Something isn't working label May 21, 2019
@Genhis Genhis added this to the 0.5.0 milestone May 21, 2019
@Genhis Genhis merged commit 53e740b into Genhis:dev May 21, 2019
Genhis added a commit that referenced this pull request Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants