Yes, it's more complicated than I thought.
XMLParser stops parsing at the first error, calls the target's close, then re-raises the exception.
HTMLParser completes parsing, calls the target's close, then re-raises the *last* exception, which hides the real problem.
I think it's now clear how I can work around this.
Yes, it's more complicated than I thought.
XMLParser stops parsing at the first error, calls the target's close, then re-raises the exception.
HTMLParser completes parsing, calls the target's close, then re-raises the *last* exception, which hides the real problem.
I think it's now clear how I can work around this.