Skip to content

Commit 9182dd7

Browse files
authored
fix: make sure that the fallback avro class has the signature as fastravro's (#57)
This makes sure that the user get the information about avro support not being installed instead of a TypeError if the schema defitnition is not supplied
1 parent c69cf1f commit 9182dd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pulsar/schema/schema_avro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def decode(self, data):
8585

8686
else:
8787
class AvroSchema(Schema):
88-
def __init__(self, _record_cls, _schema_definition):
88+
def __init__(self, _record_cls, _schema_definition=None):
8989
raise Exception("Avro library support was not found. Make sure to install Pulsar client " +
9090
"with Avro support: pip3 install 'pulsar-client[avro]'")
9191

0 commit comments

Comments
 (0)