X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fstorage%2Fparameter.py;h=2d6d0681d6e191034a2d95b0ce9204fe14151c4a;hb=130e896408741add08ebc3a1b6c74aca11023c1e;hp=1545cac483f21aacce887d69f3c87d05013375a7;hpb=04a3f20dc71bf8b3f96b1e3172623aa346a638a7;p=sfa.git diff --git a/sfa/storage/parameter.py b/sfa/storage/parameter.py index 1545cac4..2d6d0681 100644 --- a/sfa/storage/parameter.py +++ b/sfa/storage/parameter.py @@ -5,11 +5,9 @@ # Copyright (C) 2006 The Trustees of Princeton University # -from types import NoneType, IntType, LongType, FloatType, DictType, TupleType, ListType +#from types import NoneType, IntType, LongType, FloatType, DictType, TupleType, ListType from sfa.util.faults import SfaAPIError -from sfa.util.py23 import StringType - class Parameter: """ @@ -88,17 +86,17 @@ def xmlrpc_type(arg): if arg_type == NoneType: return "nil" - elif arg_type == IntType or arg_type == LongType: + elif arg_type == int: return "int" elif arg_type == bool: return "boolean" - elif arg_type == FloatType: + elif arg_type == float: return "double" - elif issubclass(arg_type, StringType): + elif arg_type == str: return "string" - elif arg_type == ListType or arg_type == TupleType: + elif arg_type in (list, tuple): return "array" - elif arg_type == DictType: + elif arg_type == dict: return "struct" elif arg_type == Mixed: # Not really an XML-RPC type but return "mixed" for