diff options
author | Yuriy Zveryanskyy <yzveryanskyy@mirantis.com> | 2013-11-15 14:13:59 +0200 |
---|---|---|
committer | Yuriy Zveryanskyy <yzveryanskyy@mirantis.com> | 2013-11-15 14:30:28 +0200 |
commit | 0a45079ebb74f1c6972cf7ed05576d8cf76942f5 (patch) | |
tree | adddabc278124a387739f459e52db13f099721e5 /ironic | |
parent | e574ad0f586559eaf8df9fb5c79bf6ae6b1bc496 (diff) | |
download | ironic-0a45079ebb74f1c6972cf7ed05576d8cf76942f5.tar.gz |
Fix integer division compatibility in middleware
Changed '/' syntax for code which requires integer result to
Python3 compatible '//'.
Change-Id: Idd61c134a8083e7d5e8f1db19372a76380bcddc0
Diffstat (limited to 'ironic')
-rw-r--r-- | ironic/api/middleware/parsable_error.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ironic/api/middleware/parsable_error.py b/ironic/api/middleware/parsable_error.py index 5bf9419ca..4b947f2ca 100644 --- a/ironic/api/middleware/parsable_error.py +++ b/ironic/api/middleware/parsable_error.py @@ -53,7 +53,7 @@ class ParsableErrorMiddleware(object): 'ErrorDocumentMiddleware received an invalid ' 'status %s') % status) else: - if (state['status_code'] / 100) not in (2, 3): + if (state['status_code'] // 100) not in (2, 3): # Remove some headers so we can replace them later # when we have the full error message and can # compute the length. @@ -66,7 +66,7 @@ class ParsableErrorMiddleware(object): return start_response(status, headers, exc_info) app_iter = self.app(environ, replacement_start_response) - if (state['status_code'] / 100) not in (2, 3): + if (state['status_code'] // 100) not in (2, 3): req = webob.Request(environ) if (req.accept.best_match(['application/json', 'application/xml']) == 'application/xml'): |