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 PyWinObject_FromEnvironmentBlock behavior #1661

Merged
merged 2 commits into from Mar 27, 2021
Merged

Fix PyWinObject_FromEnvironmentBlock behavior #1661

merged 2 commits into from Mar 27, 2021

Conversation

maxim-krikun
Copy link
Contributor

@maxim-krikun maxim-krikun commented Feb 6, 2021

PyWinObject_FromEnvironmentBlock doesn't handle equal signs in environment variable correctly.

Code to reproduce:

import os
import win32profile

os.environ["FOO"] = "bar=baz"

env = win32profile.GetEnvironmentStrings()
assert "FOO" not in env
assert env["FOO=bar"] == "baz"

assert os.environ["FOO"] == "bar=baz"

@maxim-krikun maxim-krikun marked this pull request as ready for review February 6, 2021 17:07
@maxim-krikun maxim-krikun changed the title Fix PyWinObject_FromEnvironmentBlock behaviour Fix PyWinObject_FromEnvironmentBlock behavior Feb 11, 2021
Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

Thanks, and sorry for the delay

@mhammond mhammond merged commit 969c130 into mhammond:master Mar 27, 2021
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