Removed some overzealous wrapping.
This commit is contained in:
parent
7067823e0c
commit
23fc2286ed
@ -144,7 +144,7 @@ class API(object):
|
||||
"args": {'updated_memory_size': updated_memory_size}
|
||||
})
|
||||
except Exception as e:
|
||||
LOG.error(_(e))
|
||||
LOG.error(e)
|
||||
raise exception.GuestError(original_message=str(e))
|
||||
|
||||
def stop_mysql(self):
|
||||
@ -156,7 +156,7 @@ class API(object):
|
||||
"args": {}
|
||||
})
|
||||
except Exception as e:
|
||||
LOG.error(_(e))
|
||||
LOG.error(e)
|
||||
raise exception.GuestError(original_message=str(e))
|
||||
|
||||
def upgrade(self):
|
||||
|
@ -76,7 +76,7 @@ def get_engine():
|
||||
pool_recycle=7200, echo=True,
|
||||
listeners=[KeepAliveConnection()])
|
||||
else:
|
||||
LOG.error(_(err))
|
||||
LOG.error(err)
|
||||
return ENGINE
|
||||
|
||||
|
||||
@ -232,7 +232,7 @@ class DBaaSAgent(object):
|
||||
except exc.OperationalError as err:
|
||||
# Ignore, user is already created, just reset the password
|
||||
# TODO(rnirmal): More fine grained error checking later on
|
||||
LOG.debug(_(err))
|
||||
LOG.debug(err)
|
||||
with client:
|
||||
t = text("""UPDATE mysql.user SET Password=PASSWORD(:pwd)
|
||||
WHERE User=:user;""")
|
||||
|
@ -46,7 +46,7 @@ class GuestManager(service.Manager):
|
||||
'reddwarf.guestagent.pkg.PkgAgent']
|
||||
classes = []
|
||||
for guest_driver in guest_drivers:
|
||||
LOG.info(_(guest_driver))
|
||||
LOG.info(guest_driver)
|
||||
driver = utils.import_class(guest_driver)
|
||||
classes.append(driver)
|
||||
try:
|
||||
|
@ -215,9 +215,9 @@ class Instance(object):
|
||||
"""
|
||||
if self.status not in VALID_ACTION_STATUSES:
|
||||
msg = "Instance is not currently available for an action to be " \
|
||||
"performed. Status [%s]" % self.status
|
||||
LOG.debug(_(msg))
|
||||
raise rd_exceptions.UnprocessableEntity(msg)
|
||||
"performed. Status [%s]"
|
||||
LOG.debug(_(msg) % self.status)
|
||||
raise rd_exceptions.UnprocessableEntity(_(msg) % self.status)
|
||||
|
||||
|
||||
def create_server_list_matcher(server_list):
|
||||
|
@ -116,7 +116,7 @@ class InstanceController(BaseController):
|
||||
except exception.ReddwarfError, e:
|
||||
# TODO(hub-cap): come up with a better way than
|
||||
# this to get the message
|
||||
LOG.error(_(e))
|
||||
LOG.error(e)
|
||||
return wsgi.Result(str(e), 404)
|
||||
# TODO(cp16net): need to set the return code correctly
|
||||
return wsgi.Result(views.InstanceDetailView(server).data(), 200)
|
||||
@ -134,7 +134,7 @@ class InstanceController(BaseController):
|
||||
except exception.ReddwarfError, e:
|
||||
# TODO(hub-cap): come up with a better way than
|
||||
# this to get the message
|
||||
LOG.error(_(e))
|
||||
LOG.error(e)
|
||||
return wsgi.Result(str(e), 404)
|
||||
|
||||
instance.delete()
|
||||
@ -181,7 +181,7 @@ class InstanceController(BaseController):
|
||||
try:
|
||||
volume_size = float(size)
|
||||
except (ValueError, TypeError) as err:
|
||||
LOG.error(_(err))
|
||||
LOG.error(err)
|
||||
msg = ("Required element/key - instance volume"
|
||||
"'size' was not specified as a number")
|
||||
raise rd_exceptions.ReddwarfError(msg)
|
||||
|
@ -143,7 +143,7 @@ def msg_reply(msg_id, connection_pool, reply=None, failure=None, ending=False):
|
||||
message = str(failure[1])
|
||||
tb = traceback.format_exception(*failure)
|
||||
LOG.error(_("Returning exception %s to caller"), message)
|
||||
LOG.error(_(tb))
|
||||
LOG.error(tb)
|
||||
failure = (failure[0].__name__, str(failure[1]), tb)
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user