You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/10/25 19:40:19 UTC

[GitHub] merlimat commented on a change in pull request #2848: Make IdentitySerde handle bytes as well

merlimat commented on a change in pull request #2848: Make IdentitySerde handle bytes as well
URL: https://github.com/apache/pulsar/pull/2848#discussion_r228308475
 
 

 ##########
 File path: pulsar-client-cpp/python/pulsar/functions/serde.py
 ##########
 @@ -75,6 +75,8 @@ def __init__(self):
   def serialize(self, input):
     if type(input) in self._types:
       return str(input).encode('utf-8')
+    if type(input) == bytes:
+      return input
     raise TypeError
 
 Review comment:
   We should also add context on the type that we got passed here

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services