)]}'
{"freezer_api/api/common/middleware.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"093862836c19b64010aeb467fdbc23965e9302be","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return self.app(environ, start_response)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class HookableMiddleware(object):"},{"line_number":82,"context_line":"    \"\"\""},{"line_number":83,"context_line":"    A simple wrapper class to allow us to return our WSGI middleware classes"},{"line_number":84,"context_line":"    as simple \"hook\" functions to pass to older version of falcon (\u003c 0.2.0b1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_a1a54148","line":81,"updated":"2016-06-28 14:16:08.000000000","message":"If this is a mixin class, it would be helpful to mention that explicitly. Maybe the class name could be HookableMiddlewareMixin.","commit_id":"617760cb2ee00541ada0ea2af15330914be2283e"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"093862836c19b64010aeb467fdbc23965e9302be","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    A simple wrapper class to allow us to return our WSGI middleware classes"},{"line_number":84,"context_line":"    as simple \"hook\" functions to pass to older version of falcon (\u003c 0.2.0b1)"},{"line_number":85,"context_line":"    that don\u0027t support passing in middleware directly at invocation"},{"line_number":86,"context_line":"    \"\"\""},{"line_number":87,"context_line":"    def as_before_hook(self):"},{"line_number":88,"context_line":"        # Need to wrap this up in a closure because the parameter counts"},{"line_number":89,"context_line":"        # differ"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_818925cd","line":86,"updated":"2016-06-28 14:16:08.000000000","message":"Need to follow the guidelines at http://docs.openstack.org/developer/hacking/ for writing docstrings.","commit_id":"617760cb2ee00541ada0ea2af15330914be2283e"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"093862836c19b64010aeb467fdbc23965e9302be","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        try:"},{"line_number":94,"context_line":"            return before_hook"},{"line_number":95,"context_line":"        except AttributeError:"},{"line_number":96,"context_line":"            # No such method, we presume:"},{"line_number":97,"context_line":"            return None"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_c1584d59","line":95,"updated":"2016-06-28 14:16:08.000000000","message":"This is a pretty serious error. Maybe log and throw an exception?","commit_id":"617760cb2ee00541ada0ea2af15330914be2283e"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"093862836c19b64010aeb467fdbc23965e9302be","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            return after_hook"},{"line_number":107,"context_line":"        except AttributeError:"},{"line_number":108,"context_line":"            # No such method?"},{"line_number":109,"context_line":"            return None"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_213e71da","line":107,"updated":"2016-06-28 14:16:08.000000000","message":"Log and throw and exception?","commit_id":"617760cb2ee00541ada0ea2af15330914be2283e"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"de82c654c16696ffd46a781461919ed915e6d11d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import falcon"},{"line_number":19,"context_line":"import freezer_api.common.exceptions as freezer_api_exc"},{"line_number":20,"context_line":"import json"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo_log import log"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_12fdcc3b","line":19,"updated":"2016-07-01 13:47:32.000000000","message":"This is out of order. freezer import should come last.","commit_id":"92234348e8023195a7fc71d31d120e4a5d98b33e"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"de82c654c16696ffd46a781461919ed915e6d11d","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        except AttributeError as ex:"},{"line_number":108,"context_line":"            # No such method, we presume."},{"line_number":109,"context_line":"            message \u003d \"Failed to get before hook from middleware %s - %s\" % ("},{"line_number":110,"context_line":"                self.__class__, ex.message)"},{"line_number":111,"context_line":"            LOG.error(message)"},{"line_number":112,"context_line":"            raise freezer_api_exc.FreezerAPIException(message)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_d2a18448","line":110,"updated":"2016-07-01 13:47:32.000000000","message":".format should be used instead of %s template.","commit_id":"92234348e8023195a7fc71d31d120e4a5d98b33e"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"d3985fd44259c2c46de91903e2680c505f4eb37d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import falcon"},{"line_number":19,"context_line":"import json"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import freezer_api.common.exceptions as freezer_api_exc"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from oslo_log import log"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_c1b9b07e","line":21,"updated":"2016-07-01 16:31:44.000000000","message":"This import needs to go after the oslo import.\n\nSee http://docs.openstack.org/developer/hacking/ for understanding the order of imports.","commit_id":"c6ad43fc570522445c8b391f4fd4df48ad84d2d3"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"d3985fd44259c2c46de91903e2680c505f4eb37d","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            return before_hook"},{"line_number":108,"context_line":"        except AttributeError as ex:"},{"line_number":109,"context_line":"            # No such method, we presume."},{"line_number":110,"context_line":"            message_template \u003d \"Failed to get before hook from middleware {0} - {1}\""},{"line_number":111,"context_line":"            message \u003d message_template.format(self.__name__, ex.message)"},{"line_number":112,"context_line":"            LOG.error(message)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_36f395a1","line":109,"updated":"2016-07-01 16:31:44.000000000","message":"Need to log the exception. Anytime an exception is caught, it should be logged as LOG.exception(ex).\n\nThis order is the usual to help diagnose the problem when reading the log.\n\n1) Log an error message.\n2) Then log the exception with LOG.exception(ex) to get the stack trace.\n3) Then raise the new exception.","commit_id":"c6ad43fc570522445c8b391f4fd4df48ad84d2d3"},{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"d3985fd44259c2c46de91903e2680c505f4eb37d","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            return after_hook"},{"line_number":127,"context_line":"        except AttributeError as ex:"},{"line_number":128,"context_line":"            # No such method, we presume."},{"line_number":129,"context_line":"            message_template \u003d \"Failed to get after hook from middleware {0} - {1}\""},{"line_number":130,"context_line":"            message \u003d message_template.format(self.__name__, ex.message)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_96fa4942","line":127,"updated":"2016-07-01 16:31:44.000000000","message":"Same as above. Need to LOG.exception(ex).","commit_id":"c6ad43fc570522445c8b391f4fd4df48ad84d2d3"}],"freezer_api/api/common/utils.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"093862836c19b64010aeb467fdbc23965e9302be","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        # header data but can return odd values like (None,) if the requested"},{"line_number":31,"context_line":"        # header is not present."},{"line_number":32,"context_line":"        request_id \u003d req.get_header(\u0027X-Openstack-Request-ID\u0027, True)"},{"line_number":33,"context_line":"    except falcon.HTTPBadRequest:"},{"line_number":34,"context_line":"        request_id \u003d None"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    auth_token \u003d req.get_header(\u0027X-AUTH-TOKEN\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_04ff0302","line":33,"updated":"2016-06-28 14:16:08.000000000","message":"Need to log these kinds of errors.","commit_id":"617760cb2ee00541ada0ea2af15330914be2283e"}],"freezer_api/cmd/api.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"093862836c19b64010aeb467fdbc23965e9302be","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        middleware_list.append(middleware.JSONTranslator())"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        app \u003d falcon.API(middleware\u003dmiddleware_list)"},{"line_number":65,"context_line":"    except TypeError as ex:"},{"line_number":66,"context_line":"        if \u0027middleware\u0027 in ex.message:"},{"line_number":67,"context_line":"            # falcon.API() doesn\u0027t have a named \u0027middleware\u0027 argument. This"},{"line_number":68,"context_line":"            # was introduced in version 0.2.0b1, so before that we need to"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_8441333c","line":65,"updated":"2016-06-28 14:16:08.000000000","message":"This needs to be logged.","commit_id":"617760cb2ee00541ada0ea2af15330914be2283e"}]}
