remove py23 compat layer
[sfa.git] / sfa / storage / parameter.py
index dc9d5b5..bd9d3b5 100644 (file)
@@ -8,7 +8,6 @@
 from types import NoneType, IntType, LongType, FloatType, DictType, TupleType, ListType
 from sfa.util.faults import SfaAPIError
 
-from sfa.util.py23 import StringType
 
 class Parameter:
     """
@@ -17,11 +16,11 @@ class Parameter:
     sub-parameters (i.e., dict fields).
     """
 
-    def __init__(self, type, doc = "",
-                 min = None, max = None,
-                 optional = None,
-                 ro = False,
-                 nullok = False):
+    def __init__(self, type, doc="",
+                 min=None, max=None,
+                 optional=None,
+                 ro=False,
+                 nullok=False):
         # Basic type of the parameter. Must be a builtin type
         # that can be marshalled by XML-RPC.
         self.type = type
@@ -51,6 +50,7 @@ class Parameter:
     def __repr__(self):
         return repr(self.type)
 
+
 class Mixed(tuple):
     """
     A list (technically, a tuple) of types. Use in accepts and returns
@@ -75,6 +75,7 @@ def python_type(arg):
     else:
         return type(arg)
 
+
 def xmlrpc_type(arg):
     """
     Returns the XML-RPC type of the specified argument, which may be a
@@ -91,7 +92,7 @@ def xmlrpc_type(arg):
         return "boolean"
     elif arg_type == FloatType:
         return "double"
-    elif issubclass(arg_type, StringType):
+    elif issubclass(arg_type, str):
         return "string"
     elif arg_type == ListType or arg_type == TupleType:
         return "array"