summaryrefslogtreecommitdiff
path: root/keystoneclient/shell.py
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2012-11-07 23:32:46 -0600
committerDolph Mathews <dolph.mathews@gmail.com>2012-11-07 23:32:48 -0600
commitf99be3bf3661e8af6ebf950398ed35420f237fbc (patch)
tree278ba1ddbac9d428dd5b7d949a20a2d7797c2be5 /keystoneclient/shell.py
parent8508b3e859af5806dc87af6a90b35877eb3c12ff (diff)
downloadpython-keystoneclient-f99be3bf3661e8af6ebf950398ed35420f237fbc.tar.gz
Check for auth URL before password (bug 1076235)
Change-Id: I9cebbf199e8cf3d9dd7de532b30da9f732a6dab1
Diffstat (limited to 'keystoneclient/shell.py')
-rw-r--r--keystoneclient/shell.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/keystoneclient/shell.py b/keystoneclient/shell.py
index 56e8a92..963a996 100644
--- a/keystoneclient/shell.py
+++ b/keystoneclient/shell.py
@@ -300,6 +300,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():
@@ -316,11 +321,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 (