Bump flake8 version and handle new lint errors (#1385)

This commit is contained in:
Chris Tomlinson 2017-12-08 21:02:34 +00:00 committed by Terry Cain
commit 279efc6b12
5 changed files with 11 additions and 11 deletions

View file

@ -3,12 +3,12 @@ from six.moves.urllib.parse import urlparse
def bucket_name_from_url(url):
pth = urlparse(url).path.lstrip("/")
path = urlparse(url).path.lstrip("/")
l = pth.lstrip("/").split("/")
if len(l) == 0 or l[0] == "":
parts = path.lstrip("/").split("/")
if len(parts) == 0 or parts[0] == "":
return None
return l[0]
return parts[0]
def parse_key_name(path):