From 8e2e97fd75b9eaf36d72193408d7b8b7b5793a60 Mon Sep 17 00:00:00 2001 From: yuxcer <yuxcer@126.com> Date: Wed, 22 Aug 2012 18:06:39 +0800 Subject: [PATCH] Fix swiftclient 400 error when OS_AUTH_URL is set. Description: The swift command tool will set the auth version to 2 if OS_AUTH_URL is set even use -V 1 option to set Version to 1.So when use nova/glance client and swift client in the same shell, and export environment OS_AUTH_URL, it will lead swift client to raise 400 error if swift not use keystone for auth. Fixes bug 1034158 Change-Id: I8003ff2ad4ac25fd710f87c4dab1507f6040ed3d --- bin/swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/swift b/bin/swift index baa44f86..168b0387 100755 --- a/bin/swift +++ b/bin/swift @@ -999,8 +999,7 @@ def parse_args(parser, args, enforce_requires=True): args = ['-h'] (options, args) = parser.parse_args(args) - if (not (options.auth and options.user and options.key) or - options.os_auth_url): + if (not (options.auth and options.user and options.key)): # Use 2.0 auth if none of the old args are present options.auth_version = '2.0'