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

Avoid python3 warning about not properly closing a file. #1861

Merged

Conversation

marktucker
Copy link
Contributor

Description of Change(s)

When running usdview in a python3 environment, a warning like the following could be output:

.....\python39\lib\site-packages\pxr\Usdviewq\appController.py:419: ResourceWarning: unclosed file <_io.TextIOWrapper name='...../python39/lib/site-packages/pxr/Usdviewq/usdviewstyle.q
ss' mode='r' encoding='cp65001'>
  self._setStyleSheetUsingState()

This change uses with open as to fix this problem.

  • [ X ] I have submitted a signed Contributor License Agreement

@jilliene
Copy link

Filed as internal issue #USD-7373

@pixar-oss pixar-oss merged commit 24c25b3 into PixarAnimationStudios:dev May 25, 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.

3 participants