You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ha...@apache.org on 2010/06/04 02:58:49 UTC
svn commit: r951232 - in /avro/branches/branch-1.3: CHANGES.txt
lang/py/src/avro/io.py
Author: hammer
Date: Fri Jun 4 00:58:49 2010
New Revision: 951232
URL: http://svn.apache.org/viewvc?rev=951232&view=rev
Log:
Merge r951231 from trunk to 1.3 branch. Fixes: AVRO-559.
Modified:
avro/branches/branch-1.3/CHANGES.txt
avro/branches/branch-1.3/lang/py/src/avro/io.py
Modified: avro/branches/branch-1.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/branches/branch-1.3/CHANGES.txt?rev=951232&r1=951231&r2=951232&view=diff
==============================================================================
--- avro/branches/branch-1.3/CHANGES.txt (original)
+++ avro/branches/branch-1.3/CHANGES.txt Fri Jun 4 00:58:49 2010
@@ -11,6 +11,9 @@ Avro 1.3.3 (Unreleased)
AVRO-560. Python impl should include system errors in every protocol (hammer)
+ AVRO-559. Handle read_union error where the list index of the union branch
+ to follow exceeds the size of the union schema (hammer)
+
BUG FIXES
AVRO-496. python sample_http_client.py is broken (Jeff Hodges via hammer)
Modified: avro/branches/branch-1.3/lang/py/src/avro/io.py
URL: http://svn.apache.org/viewvc/avro/branches/branch-1.3/lang/py/src/avro/io.py?rev=951232&r1=951231&r2=951232&view=diff
==============================================================================
--- avro/branches/branch-1.3/lang/py/src/avro/io.py (original)
+++ avro/branches/branch-1.3/lang/py/src/avro/io.py Fri Jun 4 00:58:49 2010
@@ -606,6 +606,10 @@ class DatumReader(object):
"""
# schema resolution
index_of_schema = int(decoder.read_long())
+ if index_of_schema >= len(writers_schema.schemas):
+ fail_msg = "Can't access branch index %d for union with %d branches"\
+ % (index_of_schema, writers_schema.schemas)
+ raise SchemaResolutionException(fail_msg, writers_schema, readers_schema)
selected_writers_schema = writers_schema.schemas[index_of_schema]
# read data