summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-16 17:32:15 +0000
committerGerrit Code Review <review@openstack.org>2012-11-16 17:32:15 +0000
commit27f0c721174b149c64cc67ff718d007d94fe79aa (patch)
tree2b5ef840d885e01e05fe68e99ba4b93603891367
parent677ff3c5205a573ed032a55a68e63cbdceb2b9bd (diff)
parentf99be3bf3661e8af6ebf950398ed35420f237fbc (diff)
downloadpython-keystoneclient-0.2.0.tar.gz
Merge "Check for auth URL before password (bug 1076235)"0.2.0
-rw-r--r--keystoneclient/shell.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/keystoneclient/shell.py b/keystoneclient/shell.py
index c72555d..3deda8d 100644
--- a/keystoneclient/shell.py
+++ b/keystoneclient/shell.py
@@ -310,6 +310,11 @@ class OpenStackIdentityShell(object):
'Expecting a username provided via either '
'--os-username or env[OS_USERNAME]')
+ if not args.os_auth_url:
+ raise exc.CommandError(
+ 'Expecting an auth URL via either --os-auth-url or '
+ 'env[OS_AUTH_URL]')
+
if not args.os_password:
# No password, If we've got a tty, try prompting for it
if hasattr(sys.stdin, 'isatty') and sys.stdin.isatty():
@@ -326,11 +331,6 @@ class OpenStackIdentityShell(object):
'--os-password, env[OS_PASSWORD], or '
'prompted response')
- if not args.os_auth_url:
- raise exc.CommandError(
- 'Expecting an auth URL via either --os-auth-url or '
- 'env[OS_AUTH_URL]')
-
# if it looks like the user wants to provide a service token
# but is missing something
if args.os_token or args.os_endpoint and not (