Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Commit

Permalink
Add error message to ElementTree.iterparse, as it's tied to the expat…
Browse files Browse the repository at this point in the history
… XML parser.
  • Loading branch information
jdhardy committed Feb 11, 2012
1 parent 08ddd9c commit 7f9fc2a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,9 @@ def parse(source, parser=None):
# @return A (event, elem) iterator.

def iterparse(source, events=None, parser=None):
if sys.platform == 'cli':
raise NotImplementedError('iterparse is not supported on IronPython. (CP #31923)')

if not hasattr(source, "read"):
source = open(source, "rb")
if not parser:
Expand Down

0 comments on commit 7f9fc2a

Please sign in to comment.