Workaround for bug in Python 2.6.1 urlparse library

This commit is contained in:
Rick Harris
2010-10-12 14:47:38 -05:00
parent 4c5a45f42d
commit 2d8dfd2d42

View File

@@ -70,7 +70,13 @@ class SwiftBackend(Backend):
netloc = parsed_uri.netloc
try:
creds, netloc = netloc.split('@')
try:
creds, netloc = netloc.split('@')
except ValueError:
# Python 2.6.1 compat
# see lp659445 and Python issue7904
creds, path = path.split('@')
user, api_key = creds.split(':')
path_parts = path.split('/')
file = path_parts.pop()