Merge "Use built-in exception filtering for GreenletExit"
This commit is contained in:
commit
a7ae6d7e24
|
@ -320,13 +320,9 @@ class Resource(object):
|
||||||
self.handle_create()
|
self.handle_create()
|
||||||
while not self.check_active():
|
while not self.check_active():
|
||||||
eventlet.sleep(1)
|
eventlet.sleep(1)
|
||||||
except Exception as ex:
|
except greenlet.GreenletExit:
|
||||||
# If we get a GreenletExit exception, the create thread has
|
|
||||||
# been killed so we should raise allowing this thread to exit
|
|
||||||
if type(ex) is greenlet.GreenletExit:
|
|
||||||
logger.warning('GreenletExit during create, exiting')
|
|
||||||
raise
|
raise
|
||||||
else:
|
except Exception as ex:
|
||||||
logger.exception('create %s', str(self))
|
logger.exception('create %s', str(self))
|
||||||
self.state_set(self.CREATE_FAILED, str(ex))
|
self.state_set(self.CREATE_FAILED, str(ex))
|
||||||
return str(ex) or "Error : %s" % type(ex)
|
return str(ex) or "Error : %s" % type(ex)
|
||||||
|
|
Loading…
Reference in New Issue