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

Fix getenv_int handling of "dos-style" newlines #7395

Merged
merged 5 commits into from Dec 28, 2022

Conversation

jepler
Copy link
Member

@jepler jepler commented Dec 28, 2022

I think this closes #7380 ; closes #7394.

…iants

.. of getenv. These can have their own special bugs.
This is a small optimization, it avoids reading the full file when an
early key is requested.

In the case of an *invalid* TOML file such as
```
K=80
K=81
```
this stops the value of K actually returned being 8081 and makes it 80
instead; but as it's a malformed file it doesn't really matter much.
Copy link
Collaborator

@dhalbert dhalbert 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 to me, including the test coverage. @rsbohn and @grbd, would you like to test? The build artifacts will be on this page in a little while: https://github.com/adafruit/circuitpython/actions/runs/3796145570

@Hecatron
Copy link

Hecatron commented Dec 28, 2022

Just tested this seems to fix #7380 looks like #7394 is the same thing as well

@rsbohn
Copy link

rsbohn commented Dec 28, 2022

Tested, working on Adafruit CircuitPython 8.0.0-beta.6-8-g8241edd52 on 2022-12-28; FeatherS2 with ESP32S2.

@dhalbert
Copy link
Collaborator

Thanks for the tests!

@dhalbert dhalbert merged commit 70b838a into adafruit:main Dec 28, 2022
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.

Error parsing the _WEB_API_PORT from settings.toml CIRCUITPY_WEB_API_PORT being ignored - ProS3 / ESP32S3
4 participants