Fix the 'www.' strip changing the lstrip method by the replace

This commit is contained in:
Sylvain Fraïssé 2013-09-23 23:34:33 +02:00
parent fe1f3ec06c
commit 596b435e57

View File

@ -9,7 +9,7 @@ def bucket_name_from_url(url):
domain = urlparse.urlparse(url).netloc
# If 'www' prefixed, strip it.
domain = domain.lstrip("www.")
domain = domain.replace("www.", "")
if 'amazonaws.com' in domain:
bucket_result = bucket_name_regex.search(domain)