summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoryuxcer <yuxcer@126.com>2012-08-22 18:06:39 +0800
committeryuxcer <yuxcer@126.com>2012-08-22 18:06:39 +0800
commit8e2e97fd75b9eaf36d72193408d7b8b7b5793a60 (patch)
treeb7910839bc017699d8fe9c219f094825ef8cd3c9 /bin
parent46aad0e8fb474dae3787c8542e9f1bea00441510 (diff)
downloadpython-swiftclient-8e2e97fd75b9eaf36d72193408d7b8b7b5793a60.tar.gz
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/swift3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/swift b/bin/swift
index baa44f8..168b038 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'