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

Fix incorrect exception handling - seek on closed file #511

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JacekPliszka
Copy link

When exception appeared in etree.XMLSchema after etree.parse(f) is finished - f is already closed and f.seek(0) generates another exception that hides the original one (Python 2.x)

When exception appeared in etree.XMLSchema after etree.parse(f) is finished - f is already closed and f.seek(0) generates another exception that hides the original one (Python 2.x)
@plq
Copy link
Member

plq commented Oct 6, 2016

I'll accept this with some modifications. I don't remember why the seek is needed but it's best to wrap it in another exception handling block if it's there to prevent it from spoiling the handler.

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