summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 (