Public bug reported: There are several places in the source code where HTTP response codes are used as numeric values. These values should be extracted to a common file and the numeric values should be replaced by constants.
For example: common/auth.py:186 elif resp.status == 404: --> elif resp.status == HTTP_NOT_FOUND; api/middleware/cache.py:261 if method == 'GET' and status_code == 204: --> if method == 'GET' and status_code == HTTP_NO_CONTENT: ** Affects: glance Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1520159 Title: HTTP response codes should be extracted to constants Status in Glance: New Bug description: There are several places in the source code where HTTP response codes are used as numeric values. These values should be extracted to a common file and the numeric values should be replaced by constants. For example: common/auth.py:186 elif resp.status == 404: --> elif resp.status == HTTP_NOT_FOUND; api/middleware/cache.py:261 if method == 'GET' and status_code == 204: --> if method == 'GET' and status_code == HTTP_NO_CONTENT: To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1520159/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp