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

Input/Output stream mode detection and rejection. #67

Open
tatarize opened this issue Aug 8, 2018 · 0 comments
Open

Input/Output stream mode detection and rejection. #67

tatarize opened this issue Aug 8, 2018 · 0 comments

Comments

@tatarize
Copy link
Contributor

tatarize commented Aug 8, 2018

While taking either a stream or a string filename gives maximal compatibility it's entirely possible to hand pyembroidery an invalid stream. Such as one opened in textmode to write a format that requires binary. This should be detected an an error should be raised rejecting unacceptable stream modes. It also might be possible to reopen a stream in the correct mode, in some cases though .name could be a file descriptor instead so better to just raise an error.

lexelby pushed a commit that referenced this issue Jul 4, 2022
"extensions" should be consistently tuple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant