Skip to content

Fix PyWinObject_FromEnvironmentBlock behavior#1661

Merged
mhammond merged 2 commits intomhammond:masterfrom
maxim-krikun:master
Mar 27, 2021
Merged

Fix PyWinObject_FromEnvironmentBlock behavior#1661
mhammond merged 2 commits intomhammond:masterfrom
maxim-krikun:master

Conversation

@maxim-krikun
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants