Modify incorrect method to translate error message

When process of powervc-drver connecting keystone failed, it would
give the error message in factory.py, but message objects do not
support str(), so it needs to be modified by using unicode.

Change-Id: I45bbb488300a5fe5c4e4f71265c3abacd775f41d
Closes-Bug: #1730356
This commit is contained in:
guanzuoyu 2017-11-06 19:21:54 +08:00
parent 3f0a4a88c4
commit 161721311a
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ def initialize_local_servicecatalog():
LOCAL = new_local_servicecatalog()
return
except Exception, e:
LOG.info(_('Keystone service is not ready. ' + str(e)))
LOG.info(_('Keystone service is not ready. %s ' % unicode(e)))
count += 1
if count == CONF['openstack']['keystone_max_try_times']:
LOG.error(_('Keystone service is not ready eventually after'