)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":28885,"name":"Ying Wang","email":"wangying@gohighsec.com","username":"yingwang"},"change_message_id":"5451b87ebb01030cdfd7aae5f8a61064c18d15a6","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            # NOTE(flwang): _locations_proxy\u0027s setattr method will check if"},{"line_number":392,"context_line":"            # the update is acceptable."},{"line_number":393,"context_line":"            image.locations \u003d value"},{"line_number":394,"context_line":"            if image.status \u003d\u003d \u0027queued\u0027:"},{"line_number":395,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":396,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as e:"},{"line_number":397,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_2df28c9b","line":394,"range":{"start_line":394,"start_character":12,"end_line":394,"end_character":40},"updated":"2018-09-03 14:55:35.000000000","message":"It could be amended that \"if image.status is \u0027queued\u0027:\". Since its operation time is faster than the old one.","commit_id":"680d5b35e7b4d40b6be35cb3a32544eb902441b7"},{"author":{"_account_id":23561,"name":"iain MacDonnell","email":"iain.macdonnell@oracle.com","username":"imacdonn"},"change_message_id":"be1caeb91ee27b86d3339020c0b0552b4ebf44f7","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            # NOTE(flwang): _locations_proxy\u0027s setattr method will check if"},{"line_number":392,"context_line":"            # the update is acceptable."},{"line_number":393,"context_line":"            image.locations \u003d value"},{"line_number":394,"context_line":"            if image.status \u003d\u003d \u0027queued\u0027:"},{"line_number":395,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":396,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as e:"},{"line_number":397,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9fd08df9","line":394,"range":{"start_line":394,"start_character":12,"end_line":394,"end_character":40},"in_reply_to":"3f79a3b5_2df28c9b","updated":"2018-09-04 17:39:03.000000000","message":"I\u0027m not sure that use of the \u0027is\u0027 operator would be appropriate/safe here - as I understand it, \u0027is\u0027 checks for references to the same object, where \u0027\u003d\u003d\u0027 checks for matching values. It might be OK if we can guarantee that the \"queued\" string will always be interned, but I\u0027m not sure that we can.\n\nIn any case, this is a backport, and the master branch already has the fix as implemented here.","commit_id":"680d5b35e7b4d40b6be35cb3a32544eb902441b7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"dc13ee8bfccfa5f7007bf1e0138f96a923a1d90e","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            # NOTE(flwang): _locations_proxy\u0027s setattr method will check if"},{"line_number":392,"context_line":"            # the update is acceptable."},{"line_number":393,"context_line":"            image.locations \u003d value"},{"line_number":394,"context_line":"            if image.status \u003d\u003d \u0027queued\u0027:"},{"line_number":395,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":396,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as e:"},{"line_number":397,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_25a04af4","line":394,"range":{"start_line":394,"start_character":12,"end_line":394,"end_character":40},"in_reply_to":"3f79a3b5_9fd08df9","updated":"2018-09-04 18:39:13.000000000","message":"Agree, there\u0027s no guarantee that the interpreter will behave the same here.\n\nAs a quick test I did several thousand loops of one then the other to test if there really was any difference (CPython 2.7.15 on Fedora 28) and actually got slightly better times with the way the code currently is.","commit_id":"680d5b35e7b4d40b6be35cb3a32544eb902441b7"}]}
