mirror of
https://opendev.org/openstack/python-heatclient.git
synced 2026-01-16 23:00:35 +00:00
Fix and enable Hacking H501 warning
Enable Gating on H501. Fix the only two cases that trigger. Change-Id: Ib309b989df6556d7436e718e1497ce4dcacc83d6
This commit is contained in:
parent
a5d71080ef
commit
d48d3587bd
2 changed files with 5 additions and 3 deletions
|
|
@ -148,11 +148,13 @@ class HTTPClient(object):
|
|||
conn.request(method, conn_url, **kwargs)
|
||||
resp = conn.getresponse()
|
||||
except socket.gaierror as e:
|
||||
message = "Error finding address for %(url)s: %(e)s" % locals()
|
||||
message = ("Error finding address for %(url)s: %(e)s" %
|
||||
{'url': url, 'e': e})
|
||||
raise exc.InvalidEndpoint(message=message)
|
||||
except (socket.error, socket.timeout) as e:
|
||||
endpoint = self.endpoint
|
||||
message = "Error communicating with %(endpoint)s %(e)s" % locals()
|
||||
message = ("Error communicating with %(endpoint)s %(e)s" %
|
||||
{'endpoint': endpoint, 'e': e})
|
||||
raise exc.CommunicationError(message=message)
|
||||
|
||||
body_iter = ResponseBodyIterator(resp)
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -22,6 +22,6 @@ downloadcache = ~/cache/pip
|
|||
|
||||
[flake8]
|
||||
show-source = True
|
||||
ignore = H233,H302,H501
|
||||
ignore = H233,H302
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue