Skip to content

Commit a4dd1fc

Browse files
committed
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
1 parent 7cda2b2 commit a4dd1fc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

openstackclient/image/v2/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ def take_action(self, parsed_args):
836836
image = image_client.images.update(image.id, **kwargs)
837837
except Exception as e:
838838
if activation_status is not None:
839-
print("Image %s was %s." % (image.id, activation_status))
839+
LOG.info(_("Image %(id)s was %(status)s."),
840+
{'id': image.id, 'status': activation_status})
840841
raise e
841842

842843

0 commit comments

Comments
 (0)