)]}'
{"os_brick/initiator/connectors/nvme.py":[{"author":{"_account_id":26968,"name":"Amit O","email":"oamit.work@gmail.com","username":"amito"},"change_message_id":"d533a6aee8abce1387f41ab0f12a98548fcd7cd0","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        super(NVMeConnector, self).__init__("},{"line_number":41,"context_line":"            root_helper,"},{"line_number":42,"context_line":"            driver\u003ddriver,"},{"line_number":43,"context_line":"            device_scan_attempts\u003ddevice_scan_attempts,"},{"line_number":44,"context_line":"            *args, **kwargs)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_193e8bb5","line":43,"range":{"start_line":43,"start_character":12,"end_line":43,"end_character":53},"updated":"2018-10-28 15:27:10.000000000","message":"I think that this should have some sort of upper bound otherwise we might keep retrying for a very long time...","commit_id":"a8215ba452c5d4c5f815cd22f49fa2e20122fb31"},{"author":{"_account_id":26968,"name":"Amit O","email":"oamit.work@gmail.com","username":"amito"},"change_message_id":"d533a6aee8abce1387f41ab0f12a98548fcd7cd0","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _get_nvme_devices(self):"},{"line_number":60,"context_line":"        nvme_devices \u003d []"},{"line_number":61,"context_line":"        pattern \u003d r\u0027/dev/nvme[0-9]n[0-9]\u0027"},{"line_number":62,"context_line":"        cmd \u003d [\u0027nvme\u0027, \u0027list\u0027]"},{"line_number":63,"context_line":"        for retry in range(1, self.device_scan_attempts + 1):"},{"line_number":64,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_5933a3f7","line":61,"range":{"start_line":61,"start_character":8,"end_line":61,"end_character":41},"updated":"2018-10-28 15:27:10.000000000","message":"IMHO, this should be a constant and not a dangling string in the method (class/module level). Also, as the regular expression never changes, I believe it\u0027s preferred that you pre-compile the regexp using \"re.compile\" for better performance.","commit_id":"a8215ba452c5d4c5f815cd22f49fa2e20122fb31"},{"author":{"_account_id":26968,"name":"Amit O","email":"oamit.work@gmail.com","username":"amito"},"change_message_id":"d533a6aee8abce1387f41ab0f12a98548fcd7cd0","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                (out, err) \u003d self._execute(*cmd,"},{"line_number":66,"context_line":"                                           root_helper\u003dself._root_helper,"},{"line_number":67,"context_line":"                                           run_as_root\u003dTrue)"},{"line_number":68,"context_line":"                for line in out.split(\u0027\\n\u0027):"},{"line_number":69,"context_line":"                    result \u003d re.match(pattern, line)"},{"line_number":70,"context_line":"                    if result:"},{"line_number":71,"context_line":"                        nvme_devices.append(result.group(0))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_991dbb62","line":68,"range":{"start_line":68,"start_character":32,"end_line":68,"end_character":43},"updated":"2018-10-28 15:27:10.000000000","message":"If I understand correctly, you can just match your regexp against the entire output and go over the matches, I don\u0027t see why line splitting is necessary.\nIf you do decide to go with line-splitting,  doesn\u0027t \".splitlines()\" give you the same result in a clearer way?","commit_id":"a8215ba452c5d4c5f815cd22f49fa2e20122fb31"}]}
