Hint in request.py in case of error

parent 4b8c1ad1
...@@ -92,13 +92,14 @@ class Recipe(object): ...@@ -92,13 +92,14 @@ class Recipe(object):
try: try:
status = self.instance.getState() status = self.instance.getState()
except slapmodule.NotFoundError: except slapmodule.NotFoundError:
status = "not ready yet, please try again" status = 'not ready yet, please try again'
# XXX-Cedric : currently raise an error. So swallow it...
except AttributeError: except AttributeError:
status = "unknown" status = 'unknown'
self.logger.error("Connection parameter %s not found. " error_message = 'Connection parameter %s not found. '
"Status of requested instance is : %s." % (self.failed, status)) 'Status of requested instance is : %s. If this error persists, '
raise KeyError("Connection parameter %s not found. " % self.failed) 'check this instance.' % (self.failed, status)
self.logger.error(error_message)
raise KeyError(error_message)
return [] return []
update = install update = install
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment