Print image uuid instead of the whole dict
After doing a commit, the CLI will print message like: Request to commit container XXX has been accepted. The image is {u'uuid': u'XXX'}. Instead of printing the whole image dict, simply print the uuid of the image will look better. Change-Id: I1c60b34e6bb30ee3c10d8ffebc97b7b16ec84e90
This commit is contained in:
parent
755f0a3508
commit
514534e6db
@ -993,7 +993,7 @@ class CommitContainer(command.Command):
|
||||
try:
|
||||
image = client.containers.commit(container, **opts)
|
||||
print("Request to commit container %s has been accepted. "
|
||||
"The image is %s." % (container, image))
|
||||
"The image is %s." % (container, image['uuid']))
|
||||
except Exception as e:
|
||||
print("commit container %(container)s failed: %(e)s" %
|
||||
{'container': container, 'e': e})
|
||||
|
@ -714,7 +714,7 @@ def do_commit(cs, args):
|
||||
try:
|
||||
image = cs.containers.commit(args.container, **opts)
|
||||
print("Request to commit container %s has been accepted. "
|
||||
"The image is %s." % (args.container, image))
|
||||
"The image is %s." % (args.container, image['uuid']))
|
||||
except Exception as e:
|
||||
print("Commit for container %(container)s failed: %(e)s" %
|
||||
{'container': args.container, 'e': e})
|
||||
|
Loading…
Reference in New Issue
Block a user