11308: Fix string/bytes confusion for Python 3
[arvados.git] / sdk / python / arvados / api.py
index 59a73b45e558d5433776eed89a8f198345fd65b2..a06170d2e4916939f25b50dfcccfe5ec67d136f8 100644 (file)
@@ -117,6 +117,7 @@ _cast_orig = apiclient_discovery._cast
 def _cast_objects_too(value, schema_type):
     global _cast_orig
     if (type(value) != type('') and
+        type(value) != type(b'') and
         (schema_type == 'object' or schema_type == 'array')):
         return json.dumps(value)
     else: