)]}'
{"zunclient/v1/containers_shell.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"16e65bdbf3c037c30ceb5dd1d71bdeb8fbd0f6e8","unresolved":false,"context_lines":[{"line_number":520,"context_line":""},{"line_number":521,"context_line":"@utils.arg(\u0027source\u0027,"},{"line_number":522,"context_line":"           metavar\u003d\u0027\u003csource\u003e\u0027,"},{"line_number":523,"context_line":"           help\u003d\u0027The source should be copied to the container or localhost.\u0027)"},{"line_number":524,"context_line":"@utils.arg(\u0027destination\u0027,"},{"line_number":525,"context_line":"           metavar\u003d\u0027\u003cdestination\u003e\u0027,"},{"line_number":526,"context_line":"           help\u003d\u0027The destination where save the source.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_b9b87676","line":523,"range":{"start_line":523,"start_character":11,"end_line":523,"end_character":15},"updated":"2017-03-04 21:53:17.000000000","message":"Mind adding the following to the help string:\n\n  The format of this parameter is [container:]path_to_the_file","commit_id":"7492021b4af89a227918f75c6d6db3575737cafc"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"16e65bdbf3c037c30ceb5dd1d71bdeb8fbd0f6e8","unresolved":false,"context_lines":[{"line_number":523,"context_line":"           help\u003d\u0027The source should be copied to the container or localhost.\u0027)"},{"line_number":524,"context_line":"@utils.arg(\u0027destination\u0027,"},{"line_number":525,"context_line":"           metavar\u003d\u0027\u003cdestination\u003e\u0027,"},{"line_number":526,"context_line":"           help\u003d\u0027The destination where save the source.\u0027)"},{"line_number":527,"context_line":"def do_cp(cs, args):"},{"line_number":528,"context_line":"    \"\"\"Copy files/tars between a container and the local filesystem.\"\"\""},{"line_number":529,"context_line":"    if \u0027:\u0027 in args.source:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_397c86b4","line":526,"range":{"start_line":526,"start_character":11,"end_line":526,"end_character":15},"updated":"2017-03-04 21:53:17.000000000","message":"Ditto, consider adding:\n\n  The format of this parameter is [container:]path_to_the_file","commit_id":"7492021b4af89a227918f75c6d6db3575737cafc"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"16e65bdbf3c037c30ceb5dd1d71bdeb8fbd0f6e8","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        try:"},{"line_number":538,"context_line":"            res \u003d cs.containers.get_archive(**opts)"},{"line_number":539,"context_line":"            filename \u003d os.path.split(container_path)[1]"},{"line_number":540,"context_line":"            dest_path \u003d args.destination + \u0027/\u0027 + filename"},{"line_number":541,"context_line":"            file \u003d open(dest_path, \u0027w\u0027)"},{"line_number":542,"context_line":"            file.write(res[0][0])"},{"line_number":543,"context_line":"            print(\"Request to get file from container %s has been accepted.\" %"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_d9de0adc","line":540,"range":{"start_line":540,"start_character":49,"end_line":540,"end_character":57},"updated":"2017-03-04 21:53:17.000000000","message":"This is an archived file so adding \u0027.tar\u0027 suffix is better.","commit_id":"7492021b4af89a227918f75c6d6db3575737cafc"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"16e65bdbf3c037c30ceb5dd1d71bdeb8fbd0f6e8","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            res \u003d cs.containers.get_archive(**opts)"},{"line_number":539,"context_line":"            filename \u003d os.path.split(container_path)[1]"},{"line_number":540,"context_line":"            dest_path \u003d args.destination + \u0027/\u0027 + filename"},{"line_number":541,"context_line":"            file \u003d open(dest_path, \u0027w\u0027)"},{"line_number":542,"context_line":"            file.write(res[0][0])"},{"line_number":543,"context_line":"            print(\"Request to get file from container %s has been accepted.\" %"},{"line_number":544,"context_line":"                  container_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_79f43e5a","line":541,"range":{"start_line":541,"start_character":19,"end_line":541,"end_character":23},"updated":"2017-03-04 21:53:17.000000000","message":"Please use with statement to open a file. This is the best practice in python for file I/O:\n\nwith open(dest_path, \u0027w\u0027) as outfile:\n    ...","commit_id":"7492021b4af89a227918f75c6d6db3575737cafc"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"16e65bdbf3c037c30ceb5dd1d71bdeb8fbd0f6e8","unresolved":false,"context_lines":[{"line_number":540,"context_line":"            dest_path \u003d args.destination + \u0027/\u0027 + filename"},{"line_number":541,"context_line":"            file \u003d open(dest_path, \u0027w\u0027)"},{"line_number":542,"context_line":"            file.write(res[0][0])"},{"line_number":543,"context_line":"            print(\"Request to get file from container %s has been accepted.\" %"},{"line_number":544,"context_line":"                  container_id)"},{"line_number":545,"context_line":"        except Exception as e:"},{"line_number":546,"context_line":"            print(\"get file from container %(container)s failed: %(e)s\" %"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_19e502a7","line":543,"range":{"start_line":543,"start_character":19,"end_line":543,"end_character":75},"updated":"2017-03-04 21:53:17.000000000","message":"We usually print this message in a 202 response. This API is a 200 response so printing this message is inappropriate. You can either print the path of the file or don\u0027t print anything instead.","commit_id":"7492021b4af89a227918f75c6d6db3575737cafc"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"16e65bdbf3c037c30ceb5dd1d71bdeb8fbd0f6e8","unresolved":false,"context_lines":[{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        try:"},{"line_number":559,"context_line":"            cs.containers.put_archive(**opts)"},{"line_number":560,"context_line":"            print(\"Request to put tars to container %s has been accepted.\" %"},{"line_number":561,"context_line":"                  container_id)"},{"line_number":562,"context_line":"        except Exception as e:"},{"line_number":563,"context_line":"            print(\"put tars to container %(container)s failed: %(e)s\" %"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_f9002e36","line":560,"range":{"start_line":560,"start_character":19,"end_line":560,"end_character":72},"updated":"2017-03-04 21:53:17.000000000","message":"Ditto, this message is inappropriate.","commit_id":"7492021b4af89a227918f75c6d6db3575737cafc"}]}
