python: Drop unicode type.
[cascardo/ovs.git] / python / ovs / ovsuuid.py
index f2d48ea..a8f0d14 100644 (file)
@@ -15,6 +15,7 @@
 import re
 import uuid
 
+import six
 from six.moves import range
 
 from ovs.db import error
@@ -40,7 +41,7 @@ def from_string(s):
 
 def from_json(json, symtab=None):
     try:
-        s = ovs.db.parser.unwrap_json(json, "uuid", [str, unicode], "string")
+        s = ovs.db.parser.unwrap_json(json, "uuid", six.string_types, "string")
         if not uuidRE.match(s):
             raise error.Error("\"%s\" is not a valid UUID" % s, json)
         return uuid.UUID(s)
@@ -49,7 +50,7 @@ def from_json(json, symtab=None):
             raise e
         try:
             name = ovs.db.parser.unwrap_json(json, "named-uuid",
-                                             [str, unicode], "string")
+                                             six.string_types, "string")
         except error.Error:
             raise e