commit cbe1d5f5e22e5f792128643e4cdd6afb2ff2b5bf
Author: Jay S. Bryant <email address hidden>
Date: Wed Feb 26 14:40:38 2014 -0600
Remove str() from LOG.* and exceptions
This commit removes the use of str() from LOG.* messages
and exceptions.
The reason we need to remove str() is because str() will fail if
it gets a Unicode string that has something that doesn't translate
to ASCII in it. If such a situation is encountered you will lose
the message string in question. In most cases, the use of str() is
unnecessary for LOG.* and exception messages. Using %s is smart
enough to figure out what to do with what it is passed. It first
tries to str() it, if this fails it falls back to using unicode. Either
way, the result will then be something that gettextutils can
handle and translate.
Reviewed: https:/ /review. openstack. org/76664 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=cbe1d5f5e22 e5f792128643e4c dd6afb2ff2b5bf
Committed: https:/
Submitter: Jenkins
Branch: master
commit cbe1d5f5e22e5f7 92128643e4cdd6a fb2ff2b5bf
Author: Jay S. Bryant <email address hidden>
Date: Wed Feb 26 14:40:38 2014 -0600
Remove str() from LOG.* and exceptions
This commit removes the use of str() from LOG.* messages
and exceptions.
The reason we need to remove str() is because str() will fail if
it gets a Unicode string that has something that doesn't translate
to ASCII in it. If such a situation is encountered you will lose
the message string in question. In most cases, the use of str() is
unnecessary for LOG.* and exception messages. Using %s is smart
enough to figure out what to do with what it is passed. It first
tries to str() it, if this fails it falls back to using unicode. Either
way, the result will then be something that gettextutils can
handle and translate.
Change-Id: I6eb81043edd9fa 5e035d81ee81e84 39340546d24
Closes-bug: 1274245
Related-bp: i18n-messages