diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-02-05 12:09:10 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-02-05 12:09:10 +0000 |
| commit | 945a697bba40ddb01ae988414040a7472f324b22 (patch) | |
| tree | 09e4ca79e61a642955477aa636df188f93e653da /glanceclient/v1 | |
| parent | 5b2603d74ebad1147ac5bfd9bf18d470fe127716 (diff) | |
| parent | 869e6ace0ebed70ba6fd73b0df7984b4d2cf0799 (diff) | |
| download | python-glanceclient-945a697bba40ddb01ae988414040a7472f324b22.tar.gz | |
Merge "Use utils.exit rather than print+sys.exit"
Diffstat (limited to 'glanceclient/v1')
| -rw-r--r-- | glanceclient/v1/shell.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index 9540a95..c14820e 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -18,7 +18,6 @@ from __future__ import print_function import copy import functools import six -import sys from oslo.utils import encodeutils from oslo.utils import strutils @@ -356,15 +355,15 @@ def do_image_delete(gc, args): def do_member_list(gc, args): """Describe sharing permissions by image or tenant.""" if args.image_id and args.tenant_id: - print('Unable to filter members by both --image-id and --tenant-id.') - sys.exit(1) + utils.exit('Unable to filter members by both --image-id and' + ' --tenant-id.') elif args.image_id: kwargs = {'image': args.image_id} elif args.tenant_id: kwargs = {'member': args.tenant_id} else: - print('Unable to list all members. Specify --image-id or --tenant-id') - sys.exit(1) + utils.exit('Unable to list all members. Specify --image-id or' + ' --tenant-id') members = gc.image_members.list(**kwargs) columns = ['Image ID', 'Member ID', 'Can Share'] |
