)]}'
{"cinder/volume/drivers/nimble.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"14f5f28b5d4836903c9500777610a13b303348a4","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Error  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_a53e9e25","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":21},"updated":"2017-01-17 17:19:09.000000000","message":"msg uses _() but this is a debug message.  I suggest that you just do LOG.error(msg) instead.","commit_id":"4e66307e55e1e67ec1c3edded948b2eb4df0d25d"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"1ecbcf0325809f7582d525d3a37a1223e31ab680","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Error  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_b71ed5b8","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":21},"in_reply_to":"7a3c09a3_a53e9e25","updated":"2017-01-17 17:36:15.000000000","message":"Or does it only matter if the if statement below is true? In that case, I could see this being better to keep as debug.\n\nBut having the msg value of (\"Error %s\" % ex) isn\u0027t that great either. This should probably give a better message, or just pass the ex message into the new exception below.","commit_id":"4e66307e55e1e67ec1c3edded948b2eb4df0d25d"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"d2461cfa3d97a8925458707d4fe9d8da1620dce3","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Error  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_738b8f1f","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":21},"in_reply_to":"7a3c09a3_b71ed5b8","updated":"2017-01-17 23:57:56.000000000","message":"Updated to remove the Error message and directly pass the ex. This is not really an exception unless it is a different error code then Object Exists in which case we raise NimbleAPIException","commit_id":"4e66307e55e1e67ec1c3edded948b2eb4df0d25d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"14f5f28b5d4836903c9500777610a13b303348a4","unresolved":false,"context_lines":[{"line_number":1341,"context_line":""},{"line_number":1342,"context_line":"        try:"},{"line_number":1343,"context_line":"            acl_record \u003d self.get_acl_record(volume_id, initiator_group_id)"},{"line_number":1344,"context_line":"            LOG.debug(\"ACL Record %(acl)s\" % {\"acl\": acl_record})"},{"line_number":1345,"context_line":"            acl_id \u003d acl_record[\u0027id\u0027]"},{"line_number":1346,"context_line":"            api \u003d \u0027access_control_records/\u0027 + six.text_type(acl_id)"},{"line_number":1347,"context_line":"            self.delete(api)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_85dd22e2","line":1344,"range":{"start_line":1344,"start_character":43,"end_line":1344,"end_character":45},"updated":"2017-01-17 17:19:09.000000000","message":"% -\u003e ,","commit_id":"4e66307e55e1e67ec1c3edded948b2eb4df0d25d"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"d2461cfa3d97a8925458707d4fe9d8da1620dce3","unresolved":false,"context_lines":[{"line_number":1341,"context_line":""},{"line_number":1342,"context_line":"        try:"},{"line_number":1343,"context_line":"            acl_record \u003d self.get_acl_record(volume_id, initiator_group_id)"},{"line_number":1344,"context_line":"            LOG.debug(\"ACL Record %(acl)s\" % {\"acl\": acl_record})"},{"line_number":1345,"context_line":"            acl_id \u003d acl_record[\u0027id\u0027]"},{"line_number":1346,"context_line":"            api \u003d \u0027access_control_records/\u0027 + six.text_type(acl_id)"},{"line_number":1347,"context_line":"            self.delete(api)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_f37f7f12","line":1344,"range":{"start_line":1344,"start_character":43,"end_line":1344,"end_character":45},"in_reply_to":"7a3c09a3_85dd22e2","updated":"2017-01-17 23:57:56.000000000","message":"Done","commit_id":"4e66307e55e1e67ec1c3edded948b2eb4df0d25d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"14f5f28b5d4836903c9500777610a13b303348a4","unresolved":false,"context_lines":[{"line_number":1347,"context_line":"            self.delete(api)"},{"line_number":1348,"context_line":"        except Exception as ex:"},{"line_number":1349,"context_line":"            msg \u003d (_(\"Error  %s\") % ex)"},{"line_number":1350,"context_line":"            LOG.debug(\"remove_acl_exception: %s\" % msg)"},{"line_number":1351,"context_line":"            if msg.__contains__(SM_OBJ_ENOENT_MSG):"},{"line_number":1352,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1353,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_858b62c2","line":1350,"updated":"2017-01-17 17:19:09.000000000","message":"Same as before.  msg is wrapped with _() but this is a debug.","commit_id":"4e66307e55e1e67ec1c3edded948b2eb4df0d25d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"311bd658765714190ab7e083a9bcb238e8c4bba7","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"%s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_47588956","line":1313,"updated":"2017-01-18 02:22:56.000000000","message":"Debug message should not use _().  Also % should be changed to ,\n\nThis looks very much the same as what you have in patch set 1 except that you removed the text \"Error\".","commit_id":"fa65633c3c371a6ab61c5027168c17fbe9b854c3"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"7f2ae6d82cdaafe21ce7c7f65e92674169e76a37","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"%s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a3c09a3_4a37adfe","line":1313,"in_reply_to":"7a3c09a3_47588956","updated":"2017-01-18 04:40:39.000000000","message":"updated the message","commit_id":"fa65633c3c371a6ab61c5027168c17fbe9b854c3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e18d821b6d0129abe4818eaac69307f4b83481dc","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        try:"},{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (\"%s\", ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_0d44dfb4","line":1312,"range":{"start_line":1312,"start_character":12,"end_line":1312,"end_character":28},"updated":"2017-01-18 05:21:14.000000000","message":"msg \u003d (_(\"Add access control failed with error:  %s\") % ex)","commit_id":"1579efa4508cc551b69bb4ac026a8feb0fcd0bbc"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"b9f14f475ceaa3b9c219f53d18298dad8d42e456","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        try:"},{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (\"%s\", ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_78436313","line":1312,"range":{"start_line":1312,"start_character":12,"end_line":1312,"end_character":28},"in_reply_to":"7a3c09a3_0d44dfb4","updated":"2017-01-18 05:38:33.000000000","message":"Done","commit_id":"1579efa4508cc551b69bb4ac026a8feb0fcd0bbc"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e18d821b6d0129abe4818eaac69307f4b83481dc","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (\"%s\", ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_edda3316","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":52},"updated":"2017-01-18 05:21:14.000000000","message":"I\u0027m not sure how much value this debug message will provide.  If the msg contains SM_OBJ_EXIST_MSG, you will print a warning msg below.  Otherwise it will raise which will print the exception message.  I think it\u0027s better to get rid of the debug message.  If you really want it, suggest change to the following so you don\u0027t get _() in a debug message.\n\nLOG.debug(\"add_acl_exception: %s\", ex.msg)","commit_id":"1579efa4508cc551b69bb4ac026a8feb0fcd0bbc"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"b9f14f475ceaa3b9c219f53d18298dad8d42e456","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (\"%s\", ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\" % msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_d86b7783","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":52},"in_reply_to":"7a3c09a3_edda3316","updated":"2017-01-18 05:38:33.000000000","message":"I prefer this approach. Thanks for the suggestion","commit_id":"1579efa4508cc551b69bb4ac026a8feb0fcd0bbc"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"5cc8e2a53d87e98ff8feef785702d46c2d6ceef9","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", ex.msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_780e038d","line":1313,"range":{"start_line":1313,"start_character":47,"end_line":1313,"end_character":53},"updated":"2017-01-18 05:56:33.000000000","message":"Sorry.  This should be ex.message.  If the exceptions are from exception.py in Cinder, then ex.msg is correct because ex.message will look like \"operation failed: %(reason)s\".  If these are general exceptions such as an IndexError, then ex.message is correct.  You should verify whether ex.message prints out correctly with an exception thrown by your API.\n\nAlternatively you can do the following so you don\u0027t need to worry about whether ex.message will print out properly.\n\nLOG.debug(\"add_acl_exception: %s\",  six.text_type(ex))","commit_id":"a17b1f1fa017b3263d4b4caafafc06edc0a285bc"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c0342e8ea6874e4e040cb4be034efd449435266b","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", ex.msg)"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_100bfdd6","line":1313,"range":{"start_line":1313,"start_character":47,"end_line":1313,"end_character":53},"in_reply_to":"7a3c09a3_780e038d","updated":"2017-01-18 13:59:16.000000000","message":"Small correction, six.text_type should not be used in the logger calls.","commit_id":"a17b1f1fa017b3263d4b4caafafc06edc0a285bc"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0ce4732a7e7595e25caa7325d4603cd00baa1fe1","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        try:"},{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", six.text_type(ex))"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_6314844c","line":1312,"updated":"2017-01-18 11:32:12.000000000","message":"Could we handle more specific exception here?","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"117c251733bcec02462eb48d069ddc67f5486587","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        try:"},{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", six.text_type(ex))"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_d1c886ab","line":1312,"in_reply_to":"7a3c09a3_6314844c","updated":"2017-01-18 18:31:57.000000000","message":"Since it is a Post call, it would be only NimbleApiException.\nUpdated to catch it.","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8dd314630879fe45416af3a9c5e7d3504ce8989e","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", six.text_type(ex))"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_71db607c","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":65},"updated":"2017-01-18 15:22:20.000000000","message":"Talked to Sean about this.  Please remove six.text_type as the logger will make the conversion.\n\nLOG.debug(\"add_acl_exception: %s\", ex)","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"117c251733bcec02462eb48d069ddc67f5486587","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", six.text_type(ex))"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_4e4873cd","line":1313,"range":{"start_line":1313,"start_character":12,"end_line":1313,"end_character":65},"in_reply_to":"7a3c09a3_71db607c","updated":"2017-01-18 18:31:57.000000000","message":"sure will do. Thanks","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0ce4732a7e7595e25caa7325d4603cd00baa1fe1","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", six.text_type(ex))"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"},{"line_number":1317,"context_line":"                             \u0027state\u0027: SM_OBJ_EXIST_MSG})"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_e3007404","line":1314,"updated":"2017-01-18 11:32:12.000000000","message":"Why not:\nif SM_OBJ_EXIST_MSG in msg?","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"117c251733bcec02462eb48d069ddc67f5486587","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"        except Exception as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", six.text_type(ex))"},{"line_number":1314,"context_line":"            if msg.__contains__(SM_OBJ_EXIST_MSG):"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"},{"line_number":1316,"context_line":"                            {\u0027vol\u0027: volume[\u0027name\u0027],"},{"line_number":1317,"context_line":"                             \u0027state\u0027: SM_OBJ_EXIST_MSG})"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_11c3ee8b","line":1314,"in_reply_to":"7a3c09a3_e3007404","updated":"2017-01-18 18:31:57.000000000","message":"Done","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0ce4732a7e7595e25caa7325d4603cd00baa1fe1","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"            acl_id \u003d acl_record[\u0027id\u0027]"},{"line_number":1346,"context_line":"            api \u003d \u0027access_control_records/\u0027 + six.text_type(acl_id)"},{"line_number":1347,"context_line":"            self.delete(api)"},{"line_number":1348,"context_line":"        except Exception as ex:"},{"line_number":1349,"context_line":"            msg \u003d (_(\"Remove access control failed with error:  %s\") % ex)"},{"line_number":1350,"context_line":"            LOG.debug(\"remove_acl_exception: %s\", six.text_type(ex))"},{"line_number":1351,"context_line":"            if msg.__contains__(SM_OBJ_ENOENT_MSG):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_8e44374a","line":1348,"updated":"2017-01-18 11:32:12.000000000","message":"This code is almost the same as above? Can we avoid copy\u0026paste here?","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"117c251733bcec02462eb48d069ddc67f5486587","unresolved":false,"context_lines":[{"line_number":1345,"context_line":"            acl_id \u003d acl_record[\u0027id\u0027]"},{"line_number":1346,"context_line":"            api \u003d \u0027access_control_records/\u0027 + six.text_type(acl_id)"},{"line_number":1347,"context_line":"            self.delete(api)"},{"line_number":1348,"context_line":"        except Exception as ex:"},{"line_number":1349,"context_line":"            msg \u003d (_(\"Remove access control failed with error:  %s\") % ex)"},{"line_number":1350,"context_line":"            LOG.debug(\"remove_acl_exception: %s\", six.text_type(ex))"},{"line_number":1351,"context_line":"            if msg.__contains__(SM_OBJ_ENOENT_MSG):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_91027e71","line":1348,"in_reply_to":"7a3c09a3_8e44374a","updated":"2017-01-18 18:31:57.000000000","message":"They are two different error codes for 2 different REST call ( post and delete).","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0ce4732a7e7595e25caa7325d4603cd00baa1fe1","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"            api \u003d \u0027access_control_records/\u0027 + six.text_type(acl_id)"},{"line_number":1347,"context_line":"            self.delete(api)"},{"line_number":1348,"context_line":"        except Exception as ex:"},{"line_number":1349,"context_line":"            msg \u003d (_(\"Remove access control failed with error:  %s\") % ex)"},{"line_number":1350,"context_line":"            LOG.debug(\"remove_acl_exception: %s\", six.text_type(ex))"},{"line_number":1351,"context_line":"            if msg.__contains__(SM_OBJ_ENOENT_MSG):"},{"line_number":1352,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_2e2c2398","line":1349,"updated":"2017-01-18 11:32:12.000000000","message":"The same as above","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"117c251733bcec02462eb48d069ddc67f5486587","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"            api \u003d \u0027access_control_records/\u0027 + six.text_type(acl_id)"},{"line_number":1347,"context_line":"            self.delete(api)"},{"line_number":1348,"context_line":"        except Exception as ex:"},{"line_number":1349,"context_line":"            msg \u003d (_(\"Remove access control failed with error:  %s\") % ex)"},{"line_number":1350,"context_line":"            LOG.debug(\"remove_acl_exception: %s\", six.text_type(ex))"},{"line_number":1351,"context_line":"            if msg.__contains__(SM_OBJ_ENOENT_MSG):"},{"line_number":1352,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a3c09a3_31f46a86","line":1349,"in_reply_to":"7a3c09a3_2e2c2398","updated":"2017-01-18 18:31:57.000000000","message":"same as above","commit_id":"72c9eb2f714d3a32ffb9213cb66818dbc21a0b71"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"88dd69582461db3bcbdbdc680597f57becbc9108","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        try:"},{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except NimbleAPIException as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", ex)"},{"line_number":1314,"context_line":"            if SM_OBJ_EXIST_MSG in msg:"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a3c09a3_0981fafb","line":1312,"range":{"start_line":1312,"start_character":68,"end_line":1312,"end_character":70},"updated":"2017-01-18 21:20:13.000000000","message":"YOu should use six.text_type here because you are actually performing string formatting. This sshould also move under the else statement below since that is the only place it is used.","commit_id":"1d1d89c82b167b2077d64f5c71fe67360c9bc698"},{"author":{"_account_id":16668,"name":"Raunak Kumar","email":"rkumar@nimblestorage.com","username":"rkumar"},"change_message_id":"8479389a854b51c7498f64a51ff20ff7f03315e4","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        try:"},{"line_number":1310,"context_line":"            self.post(api, data)"},{"line_number":1311,"context_line":"        except NimbleAPIException as ex:"},{"line_number":1312,"context_line":"            msg \u003d (_(\"Add access control failed with error:  %s\") % ex)"},{"line_number":1313,"context_line":"            LOG.debug(\"add_acl_exception: %s\", ex)"},{"line_number":1314,"context_line":"            if SM_OBJ_EXIST_MSG in msg:"},{"line_number":1315,"context_line":"                LOG.warning(_LW(\u0027Volume %(vol)s : %(state)s\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a3c09a3_e92e6ef9","line":1312,"range":{"start_line":1312,"start_character":68,"end_line":1312,"end_character":70},"in_reply_to":"7a3c09a3_0981fafb","updated":"2017-01-18 21:28:42.000000000","message":"Done","commit_id":"1d1d89c82b167b2077d64f5c71fe67360c9bc698"}]}
