)]}'
{"glance/cmd/replicator.py":[{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c2f13671296f5cd655bac367a6611c9eb6aa7918","unresolved":false,"context_lines":[{"line_number":447,"context_line":"    if len(args) \u003c 2:"},{"line_number":448,"context_line":"        logging.error(_(\"Too few arguments, try \u0027glance-replicator help \""},{"line_number":449,"context_line":"                        \"livecopy\u0027 for more information.\"))"},{"line_number":450,"context_line":"        return"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    imageservice \u003d get_image_service()"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2F6YE%3D","line":450,"updated":"2013-07-19 10:16:15.000000000","message":"Suggestion: Would it be better to raise a TypeError exception here with the usage message attached, and then catch it and exit appropriately below in main() ?\n\nIt feels less future proof to have the function just silently return here (log message isn\u0027t so visible from a code point of view)","commit_id":"efb7084160e2307806b9f4214790a815eb98db86"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"15443a1c6b336606343db41ba5010bb646406570","unresolved":false,"context_lines":[{"line_number":447,"context_line":"    if len(args) \u003c 2:"},{"line_number":448,"context_line":"        logging.error(_(\"Too few arguments, try \u0027glance-replicator help \""},{"line_number":449,"context_line":"                        \"livecopy\u0027 for more information.\"))"},{"line_number":450,"context_line":"        return"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    imageservice \u003d get_image_service()"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2Ftpo%3D","line":450,"in_reply_to":"AAAAQn%2F%2F6YE%3D","updated":"2013-07-24 15:51:54.000000000","message":"Thanks, Paul. For the new patch, I\u0027m using TypeError for arguments number check and ValueError for the format check.","commit_id":"efb7084160e2307806b9f4214790a815eb98db86"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"bfa72194329550a7f99fae7cb176001c602d83b5","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"    try:"},{"line_number":779,"context_line":"        command(options, args)"},{"line_number":780,"context_line":"        return(0)"},{"line_number":781,"context_line":"    except Exception as e:"},{"line_number":782,"context_line":"        logging.error(command.__doc__ % {\u0027prog\u0027: command.__name__})"},{"line_number":783,"context_line":"        sys.exit(\"ERROR: %s\" % e)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Ftl4%3D","line":780,"updated":"2013-07-24 16:18:13.000000000","message":"return(0) looks strange here, why not return 0?","commit_id":"27d32ff8600e39f1339e6518d262aa82f545808a"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"12f64449bdc1a2bbc76ad419908e326ce3e1bc9e","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"    try:"},{"line_number":779,"context_line":"        command(options, args)"},{"line_number":780,"context_line":"        return(0)"},{"line_number":781,"context_line":"    except Exception as e:"},{"line_number":782,"context_line":"        logging.error(command.__doc__ % {\u0027prog\u0027: command.__name__})"},{"line_number":783,"context_line":"        sys.exit(\"ERROR: %s\" % e)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FsJM%3D","line":780,"in_reply_to":"AAAAQn%2F%2Ftl4%3D","updated":"2013-07-25 02:03:53.000000000","message":"Removed.","commit_id":"27d32ff8600e39f1339e6518d262aa82f545808a"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"e8cf8efae9616f7e4611789bdad6fdf73be9bad0","unresolved":false,"context_lines":[{"line_number":478,"context_line":"    master_server_port \u003d args.pop()"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    if not re.match(SERVER_PORT_REGEX, slave_server_port) or \\"},{"line_number":481,"context_line":"        not re.match(SERVER_PORT_REGEX, master_server_port):"},{"line_number":482,"context_line":"        raise ValueError(_(\"Bad format of the given arguments.\"))"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    imageservice \u003d get_image_service()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FrPA%3D","line":481,"updated":"2013-07-25 10:01:29.000000000","message":"small, could you give this one more indent?","commit_id":"43ca8d331662f70f3190b5df825d3d249f3b38d3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"3534af4b0bbd036dcebe494cba665ef7f7f4b298","unresolved":false,"context_lines":[{"line_number":478,"context_line":"    master_server_port \u003d args.pop()"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    if not re.match(SERVER_PORT_REGEX, slave_server_port) or \\"},{"line_number":481,"context_line":"        not re.match(SERVER_PORT_REGEX, master_server_port):"},{"line_number":482,"context_line":"        raise ValueError(_(\"Bad format of the given arguments.\"))"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    imageservice \u003d get_image_service()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2Fq1c%3D","line":481,"in_reply_to":"AAAAQn%2F%2FrPA%3D","updated":"2013-07-25 12:54:42.000000000","message":"Done","commit_id":"43ca8d331662f70f3190b5df825d3d249f3b38d3"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"e8cf8efae9616f7e4611789bdad6fdf73be9bad0","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    master_server_port \u003d args.pop()"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    if not re.match(SERVER_PORT_REGEX, slave_server_port) or \\"},{"line_number":558,"context_line":"        not re.match(SERVER_PORT_REGEX, master_server_port):"},{"line_number":559,"context_line":"        raise ValueError(_(\"Bad format of the given arguments.\"))"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    imageservice \u003d get_image_service()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FrO8%3D","line":558,"updated":"2013-07-25 10:01:29.000000000","message":"same","commit_id":"43ca8d331662f70f3190b5df825d3d249f3b38d3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"3534af4b0bbd036dcebe494cba665ef7f7f4b298","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    master_server_port \u003d args.pop()"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    if not re.match(SERVER_PORT_REGEX, slave_server_port) or \\"},{"line_number":558,"context_line":"        not re.match(SERVER_PORT_REGEX, master_server_port):"},{"line_number":559,"context_line":"        raise ValueError(_(\"Bad format of the given arguments.\"))"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    imageservice \u003d get_image_service()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2Fq1Y%3D","line":558,"in_reply_to":"AAAAQn%2F%2FrO8%3D","updated":"2013-07-25 12:54:42.000000000","message":"Done","commit_id":"43ca8d331662f70f3190b5df825d3d249f3b38d3"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"e8cf8efae9616f7e4611789bdad6fdf73be9bad0","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"    try:"},{"line_number":779,"context_line":"        command(options, args)"},{"line_number":780,"context_line":"    except Exception as e:"},{"line_number":781,"context_line":"        logging.error(command.__doc__ % {\u0027prog\u0027: command.__name__})"},{"line_number":782,"context_line":"        sys.exit(\"ERROR: %s\" % e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2FrO4%3D","line":780,"updated":"2013-07-25 10:01:29.000000000","message":"what if we were to catch a TypeError/ValueError and just print str(e), and then have a final case for unexpected Exceptions where we print the traceback?","commit_id":"43ca8d331662f70f3190b5df825d3d249f3b38d3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"3534af4b0bbd036dcebe494cba665ef7f7f4b298","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"    try:"},{"line_number":779,"context_line":"        command(options, args)"},{"line_number":780,"context_line":"    except Exception as e:"},{"line_number":781,"context_line":"        logging.error(command.__doc__ % {\u0027prog\u0027: command.__name__})"},{"line_number":782,"context_line":"        sys.exit(\"ERROR: %s\" % e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAQn%2F%2Fq1U%3D","line":780,"in_reply_to":"AAAAQn%2F%2FrO4%3D","updated":"2013-07-25 12:54:42.000000000","message":"Done","commit_id":"43ca8d331662f70f3190b5df825d3d249f3b38d3"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"f0f8d0b32a568d23ce3e97931f0c4348a67ccce2","unresolved":false,"context_lines":[{"line_number":784,"context_line":"        logging.error(command.__doc__ % {\u0027prog\u0027: command.__name__})"},{"line_number":785,"context_line":"        sys.exit(\"ERROR: %s\" % e)"},{"line_number":786,"context_line":"    except Exception as e:"},{"line_number":787,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2FquU%3D","line":787,"updated":"2013-07-25 13:29:13.000000000","message":"Can we do \"raise\" without e to preserve the traceback","commit_id":"66fe68dc49817f79b516a520eae12617e2069518"}],"glance/tests/unit/test_glance_replicator.py":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"bfa72194329550a7f99fae7cb176001c602d83b5","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        self.assertTrue(test_with_no_args(command, args))"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"        command \u003d glance_replicator.replication_livecopy"},{"line_number":490,"context_line":"        self.assertTrue(test_with_no_args(command, args))"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_replication_with_bad_args(self):"},{"line_number":493,"context_line":"        def test_with_bad_args(command, args):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Ftjc%3D","line":490,"updated":"2013-07-24 16:18:13.000000000","message":"I would like to see the above tests broken into separate unit tests.","commit_id":"27d32ff8600e39f1339e6518d262aa82f545808a"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"12f64449bdc1a2bbc76ad419908e326ce3e1bc9e","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        self.assertTrue(test_with_no_args(command, args))"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"        command \u003d glance_replicator.replication_livecopy"},{"line_number":490,"context_line":"        self.assertTrue(test_with_no_args(command, args))"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def test_replication_with_bad_args(self):"},{"line_number":493,"context_line":"        def test_with_bad_args(command, args):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FsIs%3D","line":490,"in_reply_to":"AAAAQn%2F%2Ftjc%3D","updated":"2013-07-25 02:03:53.000000000","message":"Done. Thanks for the suggestion. TBO, I hesitated to merge these test cases as one or separately :)","commit_id":"27d32ff8600e39f1339e6518d262aa82f545808a"}]}
