X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fserver%2Fxmlrpcapi.py;h=8b8bd78123d93feb7db75632566de5f3b4f108ed;hb=ecc85e0b923922cf7117d29b380f5284edb88f21;hp=f182ee0b9db81f71b901398eb1b98e04c36ba898;hpb=19dff4d49e0bf51857903d759947d0a1b01229a4;p=sfa.git diff --git a/sfa/server/xmlrpcapi.py b/sfa/server/xmlrpcapi.py index f182ee0b..8b8bd781 100644 --- a/sfa/server/xmlrpcapi.py +++ b/sfa/server/xmlrpcapi.py @@ -71,7 +71,7 @@ def xmlrpclib_dump(self, value, write): if isinstance(value, Type): f(*args) return - raise TypeError, "cannot marshal %s objects" % type(value) + raise TypeError("cannot marshal %s objects" % type(value)) else: f(*args) @@ -102,7 +102,7 @@ class XmlrpcApi: """ # Look up method if method not in self.methods: - raise SfaInvalidAPIMethod, method + raise SfaInvalidAPIMethod(method) # Get new instance of method try: @@ -111,7 +111,8 @@ class XmlrpcApi: callablemethod = getattr(module, classname)(self) return getattr(module, classname)(self) except (ImportError, AttributeError): - raise SfaInvalidAPIMethod, method + self.logger.log_exc("Error importing method: %s" % method) + raise SfaInvalidAPIMethod(method) def call(self, source, method, *args): """