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

[automation/python] - Use TemporaryFile and seek() #6421

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

komalali
Copy link
Member

@komalali komalali commented Feb 24, 2021

This PR fixes the usage of TemporaryFile in python automation API. Particularly in Windows, NamedTemporaryFile cannot be reopened while it is already open, which was leading to errors. We don't need a NamedTemporaryFile nor did we need to reopen it, we just needed seek to get back to the beginning of the file before we read it.

We don't run SDK unit tests in our Windows build which is why this wasn't caught, but I've opened an issue to track that work.

#6424 has an example of the repro and a rerun with this change included that passes.

Fixes: #6402

Copy link
Contributor

@EvanBoyle EvanBoyle left a comment

Choose a reason for hiding this comment

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

🎉 🐍 🚢

@komalali komalali merged commit 24e07ab into master Feb 25, 2021
@komalali komalali deleted the komalali/python-tempfile branch February 25, 2021 01:21
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.

win10 PermissionError on create_or_select_stack
2 participants