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

ResourceWarning in attachment.upload. File not closed. #191

Open
olivergondza opened this issue Jan 16, 2023 · 0 comments
Open

ResourceWarning in attachment.upload. File not closed. #191

olivergondza opened this issue Jan 16, 2023 · 0 comments

Comments

@olivergondza
Copy link

When an attachment is uploaded, following warning is issued.

./usr/local/lib/python3.9/site-packages/pysnow/attachment.py:70: ResourceWarning: unclosed file <_io.BufferedReader name='/my/file.txt'>
  data = open(file_path, "rb").read()

data = open(file_path, "rb").read()

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

No branches or pull requests

1 participant