)]}'
{"cinderclient/utils.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c65e06aeecc2ed10fff620e6adc02495483f0859","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    try:"},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            resource \u003d getattr(manager, \u0027resource_class\u0027, None)"},{"line_number":183,"context_line":"            name_attr \u003d resource.NAME_ATTR if resource else \u0027display_name\u0027"},{"line_number":184,"context_line":"            return manager.find(**{name_attr: name_or_id})"},{"line_number":185,"context_line":"        except (UnicodeDecodeError, exceptions.NotFound):"},{"line_number":186,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"9af37de9_ae4bdbaf","line":183,"updated":"2015-05-11 16:51:05.000000000","message":"I don\u0027t like assuming here that it\u0027s display_name. If we don\u0027t have resource_class or NAME_ATTR we should do as we did before, try one after the other.\n\nAnd if we were to assume we should assume \u0027name\u0027 instead, as that\u0027s the common field name specified in Resource base class.","commit_id":"a13264b81252fb8c26e3a898e707a2b9a73bb7e9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"646d04bbd48318bab49e8d85a85cfc2a8ed303bc","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    try:"},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            resource \u003d getattr(manager, \u0027resource_class\u0027, None)"},{"line_number":183,"context_line":"            name_attr \u003d resource.NAME_ATTR if resource else \u0027display_name\u0027"},{"line_number":184,"context_line":"            return manager.find(**{name_attr: name_or_id})"},{"line_number":185,"context_line":"        except (UnicodeDecodeError, exceptions.NotFound):"},{"line_number":186,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_c85cd9ef","line":183,"in_reply_to":"9a0c5dc1_1fa0e9f3","updated":"2015-05-12 12:45:10.000000000","message":"I agree, there\u0027s no way this will go to that default case unless there\u0027s something wrong elsewhere, but it made more sense to use \u0027name\u0027.","commit_id":"a13264b81252fb8c26e3a898e707a2b9a73bb7e9"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"4ea8379a6bdbb2f4d8981661244c0baa1c39164e","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    try:"},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            resource \u003d getattr(manager, \u0027resource_class\u0027, None)"},{"line_number":183,"context_line":"            name_attr \u003d resource.NAME_ATTR if resource else \u0027display_name\u0027"},{"line_number":184,"context_line":"            return manager.find(**{name_attr: name_or_id})"},{"line_number":185,"context_line":"        except (UnicodeDecodeError, exceptions.NotFound):"},{"line_number":186,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_1fa0e9f3","line":183,"in_reply_to":"9af37de9_ae4bdbaf","updated":"2015-05-12 11:48:30.000000000","message":"Sure we should assign default attr \u0027name\u0027 as in base class, it\u0027s my fail, I\u0027ll fix it in next patch.\n\nAs for resource_class and NAME_ATTR, there are base classes attributes, resource and manager classes, and they are present in all child classes, so I don\u0027t see the problem with case when there aren\u0027t exist.","commit_id":"a13264b81252fb8c26e3a898e707a2b9a73bb7e9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c65e06aeecc2ed10fff620e6adc02495483f0859","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            resource \u003d getattr(manager, \u0027resource_class\u0027, None)"},{"line_number":183,"context_line":"            name_attr \u003d resource.NAME_ATTR if resource else \u0027display_name\u0027"},{"line_number":184,"context_line":"            return manager.find(**{name_attr: name_or_id})"},{"line_number":185,"context_line":"        except (UnicodeDecodeError, exceptions.NotFound):"},{"line_number":186,"context_line":"            pass"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # finally try to find entity by human_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"9af37de9_4ed10fcd","line":185,"updated":"2015-05-11 16:51:05.000000000","message":"In which case do we expect UnicodeDecodeError? safe_decode should have taken care of that, right?","commit_id":"a13264b81252fb8c26e3a898e707a2b9a73bb7e9"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"4ea8379a6bdbb2f4d8981661244c0baa1c39164e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            resource \u003d getattr(manager, \u0027resource_class\u0027, None)"},{"line_number":183,"context_line":"            name_attr \u003d resource.NAME_ATTR if resource else \u0027display_name\u0027"},{"line_number":184,"context_line":"            return manager.find(**{name_attr: name_or_id})"},{"line_number":185,"context_line":"        except (UnicodeDecodeError, exceptions.NotFound):"},{"line_number":186,"context_line":"            pass"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # finally try to find entity by human_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_1fe229d6","line":185,"in_reply_to":"9af37de9_4ed10fcd","updated":"2015-05-12 11:48:30.000000000","message":"not sure, it is existing code, but I agree it looks like redundant one","commit_id":"a13264b81252fb8c26e3a898e707a2b9a73bb7e9"}]}
