From d72f738c014fc76596d2f323e94cdb0e97116e71 Mon Sep 17 00:00:00 2001 From: whoami-rajat Date: Thu, 4 Jul 2019 15:14:29 +0530 Subject: [PATCH] Correcting the response status range in WsgiLimiterProxy The response status should lie between 200 and 300 but the operator used makes the condition true when response status is <= 200. This patch corrects the same. Change-Id: I7368eb7674642032b1313afe900b5f36f8ab0dea Closes-Bug: #1823750 --- cinder/api/v2/limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/api/v2/limits.py b/cinder/api/v2/limits.py index fe31e611e82..1066943611b 100644 --- a/cinder/api/v2/limits.py +++ b/cinder/api/v2/limits.py @@ -416,7 +416,7 @@ class WsgiLimiterProxy(object): resp = conn.getresponse() - if http_client.OK >= resp.status < http_client.MULTIPLE_CHOICES: + if (resp.status >= 200) and (resp.status < 300): return None, None return resp.getheader("X-Wait-Seconds"), resp.read() or None