Skip to content

Commit 9108c7b

Browse files
committed
fix: minor: py3 compatibility wrt avro
1 parent cec0213 commit 9108c7b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

schema_salad/schema.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
from six.moves.urllib import parse
1414
import six
1515
import os
16-
AvroSchemaFromJSONData = avro.schema.make_avsc_object
17-
# AvroSchemaFromJSONData=avro.schema.SchemaFromJSONData
16+
17+
if six.PY3:
18+
AvroSchemaFromJSONData = avro.schema.SchemaFromJSONData
19+
else:
20+
AvroSchemaFromJSONData = avro.schema.make_avsc_object
21+
22+
1823
from avro.schema import Names, SchemaParseException
1924
from . import ref_resolver
2025
from .ref_resolver import Loader, DocumentType

0 commit comments

Comments
 (0)