spyne icon indicating copy to clipboard operation
spyne copied to clipboard

Fix incorrect exception handling - seek on closed file

Open JacekPliszka opened this issue 9 years ago • 1 comments

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)

JacekPliszka avatar Oct 05 '16 18:10 JacekPliszka

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.

plq avatar Oct 06 '16 10:10 plq