Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(157045)

#10590: Parameter type error for xml.sax.parseString(string, ...)

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 10 months ago by tom.a.ryan
Modified:
4 years, 8 months ago
Reviewers:
ezio.melotti, storchaka
CC:
loewis, Georg, terry.reedy, gale_sefer.org, christian.heimes, ezio.melotti, eli.bendersky, tom.a.ryan_gmail.com, tshepang, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 4

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/xml.sax.rst View 1 1 chunk +5 lines, -1 line 0 comments Download
Lib/test/test_sax.py View 1 1 chunk +7 lines, -0 lines 0 comments Download
Lib/xml/sax/__init__.py View 1 2 chunks +5 lines, -3 lines 0 comments Download
Misc/NEWS View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2
ezio.melotti
http://bugs.python.org/review/10590/diff/7137/Lib/xml/etree/ElementTree.py File Lib/xml/etree/ElementTree.py (right): http://bugs.python.org/review/10590/diff/7137/Lib/xml/etree/ElementTree.py#newcode661 Lib/xml/etree/ElementTree.py:661: print(repr(data)) I think you forgot a print here :) ...
6 years, 10 months ago #1
storchaka_gmail.com
6 years, 10 months ago #2
http://bugs.python.org/review/10590/diff/7137/Lib/xml/etree/ElementTree.py
File Lib/xml/etree/ElementTree.py (right):

http://bugs.python.org/review/10590/diff/7137/Lib/xml/etree/ElementTree.py#ne...
Lib/xml/etree/ElementTree.py:661: print(repr(data))
On 2013/01/19 14:07:51, ezio.melotti wrote:
> I think you forgot a print here :)

Indeed. :)

http://bugs.python.org/review/10590/diff/7137/Lib/xml/sax/expatreader.py
File Lib/xml/sax/expatreader.py (right):

http://bugs.python.org/review/10590/diff/7137/Lib/xml/sax/expatreader.py#newc...
Lib/xml/sax/expatreader.py:227: file = self._source.getByteStream()
On 2013/01/19 14:07:51, ezio.melotti wrote:
> Shouldn't this line be in the try block (or possibly in the except)?

No. We first try to close character stream, and then (unconditionally) try to
close byte stream. Both stream can raise an exception in close().

>  Can't the
> "if" that closes the file be included only once in the finally?

We should close both streams.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+