diff options
| author | liyifeng <307419146@qq.com> | 2016-06-21 10:12:08 +0800 |
|---|---|---|
| committer | liyifeng <307419146@qq.com> | 2016-06-21 13:52:51 +0800 |
| commit | a4dd1fc71402c8ccc10387c889f40c09e7396b8b (patch) | |
| tree | 8953c3f14af3f75991bcfe4e4ad35becda16f475 /openstackclient/image | |
| parent | 7cda2b2a066cd45c7aeb9a6d92c1a83e49d48128 (diff) | |
| download | python-openstackclient-a4dd1fc71402c8ccc10387c889f40c09e7396b8b.tar.gz | |
Make the print info support i18n
When OSC failed to set a image's property, it will print
the image name and status, which is an useful info to
users. So translate this massage, and record it in log.
Change-Id: Icdff4dab17dedcb40289700c4cd278e6e62eea25
Diffstat (limited to 'openstackclient/image')
| -rw-r--r-- | openstackclient/image/v2/image.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 82566ff3..309b1b6b 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -836,7 +836,8 @@ class SetImage(command.Command): image = image_client.images.update(image.id, **kwargs) except Exception as e: if activation_status is not None: - print("Image %s was %s." % (image.id, activation_status)) + LOG.info(_("Image %(id)s was %(status)s."), + {'id': image.id, 'status': activation_status}) raise e |
