Address PEP8 Failures in Armada
Flake8 version recently updated to include new PEP8 rules. Some of the codebase is not compliant with the new rules. Change-Id: Ieb9de200535b6e3fd743e1c0f2e851e81cae79f3
This commit is contained in:
parent
6b2c7245de
commit
bbfe30e4a4
|
@ -154,8 +154,7 @@ class ArmadaClient(object):
|
||||||
def _check_response(self, resp):
|
def _check_response(self, resp):
|
||||||
if resp.status_code == 401:
|
if resp.status_code == 401:
|
||||||
raise err.ClientUnauthorizedError(
|
raise err.ClientUnauthorizedError(
|
||||||
"Unauthorized access to %s, include valid token.".format(
|
"Unauthorized access to %s, include valid token." % resp.url)
|
||||||
resp.url))
|
|
||||||
elif resp.status_code == 403:
|
elif resp.status_code == 403:
|
||||||
raise err.ClientForbiddenError("Forbidden access to %s" % resp.url)
|
raise err.ClientForbiddenError("Forbidden access to %s" % resp.url)
|
||||||
elif not resp.ok:
|
elif not resp.ok:
|
||||||
|
|
|
@ -147,7 +147,7 @@ class GetReleaseContentException(TillerException):
|
||||||
'''Exception that occurs during a failed Release Testing'''
|
'''Exception that occurs during a failed Release Testing'''
|
||||||
|
|
||||||
def __init__(self, release, version):
|
def __init__(self, release, version):
|
||||||
message = 'Failed to get {} content {} version {}'.format(
|
message = 'Failed to get {} content {} version'.format(
|
||||||
release, version)
|
release, version)
|
||||||
|
|
||||||
super(GetReleaseContentException, self).__init__(message)
|
super(GetReleaseContentException, self).__init__(message)
|
||||||
|
|
|
@ -46,10 +46,10 @@ class ReferenceResolver(object):
|
||||||
if isinstance(design_ref, str):
|
if isinstance(design_ref, str):
|
||||||
design_ref = [design_ref]
|
design_ref = [design_ref]
|
||||||
|
|
||||||
for l in design_ref:
|
for link in design_ref:
|
||||||
try:
|
try:
|
||||||
LOG.debug("Resolving reference %s." % l)
|
LOG.debug("Resolving reference %s." % link)
|
||||||
design_uri = urllib.parse.urlparse(l)
|
design_uri = urllib.parse.urlparse(link)
|
||||||
|
|
||||||
# when scheme is a empty string assume it is a local
|
# when scheme is a empty string assume it is a local
|
||||||
# file path
|
# file path
|
||||||
|
@ -75,7 +75,7 @@ class ReferenceResolver(object):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise InvalidPathException(
|
raise InvalidPathException(
|
||||||
"Cannot resolve design reference %s: unable "
|
"Cannot resolve design reference %s: unable "
|
||||||
"to parse as valid URI." % l)
|
"to parse as valid URI." % link)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue