diff options
author | liujiong <liujiong@gohighsec.com> | 2016-08-18 15:17:17 +0800 |
---|---|---|
committer | liujiong <liujiong@gohighsec.com> | 2016-08-18 15:17:17 +0800 |
commit | 084ce7c0d2f6442b37bac05cb00977891e230128 (patch) | |
tree | 9058fcd756a79837a9dc67d388812b4a6f06a51c /barbicanclient | |
parent | 06066e77845641fcb193a321d7f10c0387073dff (diff) | |
download | python-barbicanclient-084ce7c0d2f6442b37bac05cb00977891e230128.tar.gz |
Use international logging message
Change-Id: I8e34028f0117e85fbbdc4f5fef884e41ac57a186
Diffstat (limited to 'barbicanclient')
-rw-r--r-- | barbicanclient/barbican.py | 7 | ||||
-rw-r--r-- | barbicanclient/secrets.py | 17 |
2 files changed, 14 insertions, 10 deletions
diff --git a/barbicanclient/barbican.py b/barbicanclient/barbican.py index 87abec1..1aa505f 100644 --- a/barbicanclient/barbican.py +++ b/barbicanclient/barbican.py @@ -32,6 +32,7 @@ from keystoneclient import session import six from barbicanclient import client +from barbicanclient._i18n import _LW from barbicanclient import version @@ -340,9 +341,9 @@ class Barbican(app.App): def main(argv=sys.argv[1:]): logging.basicConfig() - LOG.warning("This Barbican CLI interface has been deprecated and will be " - "removed in the O release. Please use the openstack unified " - "client instead.") + LOG.warning(_LW("This Barbican CLI interface has been deprecated and " + "will be removed in the O release. Please use the " + "openstack unified client instead.")) barbican_app = Barbican() return barbican_app.run(argv) diff --git a/barbicanclient/secrets.py b/barbicanclient/secrets.py index cf707ba..a5a1402 100644 --- a/barbicanclient/secrets.py +++ b/barbicanclient/secrets.py @@ -23,6 +23,7 @@ from barbicanclient import acls as acl_manager from barbicanclient import base from barbicanclient import exceptions from barbicanclient import formatter +from barbicanclient._i18n import _LW LOG = logging.getLogger(__name__) @@ -191,7 +192,7 @@ class Secret(SecretFormatter): try: self._fetch_payload() except ValueError: - LOG.warning("Secret does not contain a payload") + LOG.warning(_LW("Secret does not contain a payload")) return None return self._payload @@ -240,9 +241,10 @@ class Secret(SecretFormatter): @immutable_after_save def payload_content_type(self, value): LOG.warning( - 'DEPRECATION WARNING: Manually setting the payload_content_type ' - 'can lead to unexpected results. It will be removed in a future ' - 'release. See Launchpad Bug #1419166.' + _LW('DEPRECATION WARNING: Manually setting the ' + 'payload_content_type can lead to unexpected ' + 'results. It will be removed in a future release. ' + 'See Launchpad Bug #1419166.') ) self._payload_content_type = value @@ -250,9 +252,10 @@ class Secret(SecretFormatter): @immutable_after_save def payload_content_encoding(self, value): LOG.warning( - 'DEPRECATION WARNING: Manually setting the ' - 'payload_content_encoding can lead to unexpected results. It ' - 'will be removed in a future release. See Launchpad Bug #1419166.' + _LW('DEPRECATION WARNING: Manually setting the ' + 'payload_content_encoding can lead to unexpected ' + 'results. It will be removed in a future release. ' + 'See Launchpad Bug #1419166.') ) self._payload_content_encoding = value |