You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/08/12 15:32:24 UTC

[GitHub] [qpid-proton] kpvdr commented on a change in pull request #256: PROTON-2237: Correct checking of Proton message property keys

kpvdr commented on a change in pull request #256:
URL: https://github.com/apache/qpid-proton/pull/256#discussion_r469348071



##########
File path: python/proton/_message.py
##########
@@ -90,10 +90,12 @@ def _check(self, err):
 
     def _check_property_keys(self):
         for k in self.properties.keys():
-            # Check for string type. (py2: unicode, py3: str via type hack above)
-            # String subclasses symbol and char are excluded
-            # (But so are other string subclasses that would be encoded as type string!)
-            if type(k) == unicode:
+            # Check for string types. (py2: unicode, py3: str via type hack above)
+            # or string subclasses
+            if isinstance(k, unicode):
+                # Convert string subclasses (including proton char and symbol types) to string

Review comment:
       Now that we are specifically excluding symbol and char types, your code applies.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org