From cf869eb1efb8f45aaa673c21f9af3b211358ccfb Mon Sep 17 00:00:00 2001 From: Dale Smith Date: Tue, 18 Oct 2016 17:13:34 +0100 Subject: [PATCH] Better support for unauthenticated requests. * Don't complain about missing account info if we know the request will be unauthenticated. Change-Id: I573a485798a1e59b453d1ce8569c3557912998a5 --- stacktaskclient/shell.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stacktaskclient/shell.py b/stacktaskclient/shell.py index a97535d..896bd7e 100644 --- a/stacktaskclient/shell.py +++ b/stacktaskclient/shell.py @@ -413,14 +413,16 @@ class StacktaskShell(object): self.do_bash_completion(args) return 0 - if not args.os_username and not args.os_token: + if (not args.os_username and not args.os_token and + not args.os_no_client_auth): raise exc.CommandError( _("You must provide a username via either " "--os-username or env[OS_USERNAME] " "or a token via --os-token or " "env[OS_TOKEN]")) - if not args.os_password and not args.os_token: + if (not args.os_password and not args.os_token and + not args.os_no_client_auth): raise exc.CommandError( _("You must provide a password via either " "--os-password or env[OS_PASSWORD] "