3 File that contains errors that can occur in CondDBFW. 17 return "The server '%s' was not found." % self.
server_name 24 return "Ran out of retries for contacting the server, where the limit was %d" % self.
retry_limit 29 def checker(function):
31 def function_with_exception(self, *args, **kwargs):
34 return_value =
function(self, *args, **kwargs)
36 dictionary = json.loads(return_value)
38 elif check ==
"base64":
39 return base64.b64decode(
str(return_value))
42 except (ValueError, TypeError)
as e:
44 self._outputter.write(
"Couldn't decode response in function '%s' - this is a fault on the server side. Response is:" % function.__name__)
45 self._outputter.write(return_value)
46 self.write_server_side_log(self._log_data)
50 function_with_exception.__doc__ = function.__doc__
52 return function_with_exception
def __init__(self, retry_limit)
def check_response(check="json")
def __init__(self, server_name)