summaryrefslogtreecommitdiff
path: root/ironic/api/hooks.py
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2018-05-08 12:21:13 -0700
committerJulia Kreger <juliaashleykreger@gmail.com>2018-05-09 06:11:30 -0700
commit530a3ed088dd2a21bbf4ca4c9e4c2a62fa2248db (patch)
tree73685925f7523ea994def0c5280b3e92ae979fc3 /ironic/api/hooks.py
parent6ff9a6b14c22c2cf640ba7a20828fed976b25f03 (diff)
downloadironic-530a3ed088dd2a21bbf4ca4c9e4c2a62fa2248db.tar.gz
Fix W504 errors
Also a few related errors based on some earlier investigation may have been pulled in along the lines of E305. Story: #2001985 Change-Id: Ifb2d3b481202fbd8cbb472e02de0f14f4d0809fd
Diffstat (limited to 'ironic/api/hooks.py')
-rw-r--r--ironic/api/hooks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ironic/api/hooks.py b/ironic/api/hooks.py
index a701d085d..f5dc5705e 100644
--- a/ironic/api/hooks.py
+++ b/ironic/api/hooks.py
@@ -145,8 +145,8 @@ class NoExceptionTracebackHook(hooks.PecanHook):
# Do nothing if there is no error.
# Status codes in the range 200 (OK) to 399 (400 = BAD_REQUEST) are not
# an error.
- if (http_client.OK <= state.response.status_int <
- http_client.BAD_REQUEST):
+ if (http_client.OK <= state.response.status_int
+ < http_client.BAD_REQUEST):
return
json_body = state.response.json
@@ -175,5 +175,5 @@ class PublicUrlHook(hooks.PecanHook):
"""
def before(self, state):
- state.request.public_url = (cfg.CONF.api.public_endpoint or
- state.request.host_url)
+ state.request.public_url = (cfg.CONF.api.public_endpoint
+ or state.request.host_url)