msg60358 - (view) |
Author: Jack Jansen (jackjansen) *  |
Date: 2003-07-21 22:06 |
If you pass a garbage file to plistlib you can get all sorts of unexpected exceptions, for instance from the XML parser. This makes it hard to catch these errors, it would be better if plistlib caught the errors and raised a new one. |
|
|
msg81502 - (view) |
Author: Daniel Diniz (ajaksu2) *  |
Date: 2009-02-09 21:50 |
Here's a very simple patch, is this the only path for errors from garbage? I think docs are needed too: if apps catching ExpatError explicitly, will break. Not sure if this should actually change, as I don't use plistlib. I havve nothing against closing this RFE as won't fix :) |
|
|
msg110335 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2010-07-14 22:26 |
If anything is to be done the patch needs updating. I'd be inclined to close this as "won't fix" unless someone can come up with a really compelling reason to implement it. |
|
|
msg114253 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2010-08-18 17:24 |
Closing as no reply to . |
|
|
msg126088 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-01-12 12:37 |
I think this was closed prematurely. I would like a core dev to assess this issue and reject or validate it. |
|
|
msg126105 - (view) |
Author: Mher Movsisyan (mher) |
Date: 2011-01-12 15:31 |
I don't see compelling reasons to wrap ExpatError in ValueError. ExpatError contains extra diagnostic information such as line and column numbers. |
|
|
msg133498 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2011-04-11 04:12 |
Note that this behavior is documented[0]: """ The XML data is parsed using the Expat parser from xml.parsers.expat – see its documentation for possible exceptions on ill-formed XML. Unknown elements will simply be ignored by the plist parser. """ Since this is documented and expat only has an exception type (xml.parsers.expat.ExpatError) I don't think is necessary to do anything here. Unless you think that the doc should be rephrased, this can be closed again. [0]: http://docs.python.org/library/plistlib.html#plistlib.readPlist |
|
|
msg133499 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2011-04-11 04:41 |
I agree. If it were important to make plistlib error handling more useful, using a different parser would be the way to go, I think. In any case, Apple has deprecated the use of XML plists and moved to a binary plist format that plistlib does not recognize or handle. |
|
|