)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":6889,"name":"Fabien Boucher","email":"fboucher@redhat.com","username":"fabien-boucher"},"change_message_id":"33820e286fd926360671d89862817c6620bae636","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c1f0404c_915756c3","updated":"2023-01-12 11:04:44.000000000","message":"Some comments inline","commit_id":"a0f5bb65d09e991d7106b633bb8d8a1466bdcc36"}],"logscraper/logscraper.py":[{"author":{"_account_id":6889,"name":"Fabien Boucher","email":"fboucher@redhat.com","username":"fabien-boucher"},"change_message_id":"33820e286fd926360671d89862817c6620bae636","unresolved":true,"context_lines":[{"line_number":506,"context_line":"    return files"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"def write_file(response, directory, filename):"},{"line_number":510,"context_line":"    if response.status_code \u003d\u003d 200:"},{"line_number":511,"context_line":"        with open(\"%s/%s\" % (directory, filename), \u0027wb\u0027) as f:"},{"line_number":512,"context_line":"            for txt in response.iter_content(1024):"}],"source_content_type":"text/x-python","patch_set":3,"id":"61056544_91cd65b2","line":509,"updated":"2023-01-12 11:04:44.000000000","message":"- Perhaps rename write_response_in_file\n- Currently it is only used by the ensure_file_downloaded function\n  so why not just declaring this function inside ensure_file_downloaded ?\n- Perhaps the status code check must be put outside of that function. Is it the responsability of that function to check the status code ?\n- What if the status code is not 200 ? we just skip ?\n- What if we get a 30X code ? Perhaps use status_code.ok ?","commit_id":"a0f5bb65d09e991d7106b633bb8d8a1466bdcc36"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"e2ae420c2637f05103ea34870f447fa6b18aeb50","unresolved":false,"context_lines":[{"line_number":506,"context_line":"    return files"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"def write_file(response, directory, filename):"},{"line_number":510,"context_line":"    if response.status_code \u003d\u003d 200:"},{"line_number":511,"context_line":"        with open(\"%s/%s\" % (directory, filename), \u0027wb\u0027) as f:"},{"line_number":512,"context_line":"            for txt in response.iter_content(1024):"}],"source_content_type":"text/x-python","patch_set":3,"id":"8c4f3f31_3043f256","line":509,"in_reply_to":"61056544_91cd65b2","updated":"2023-01-17 10:07:50.000000000","message":"Perhaps rename write_response_in_file -\u003e done\nCurrently it is only used by the ensure_file_downloaded function -\u003e also in download_file function\nPerhaps the status code check must be put outside of that function. Is it the responsability of that function to check the status code ? -\u003e done\nWhat if we get a 30X code ? Perhaps use status_code.ok ? -\u003e done","commit_id":"a0f5bb65d09e991d7106b633bb8d8a1466bdcc36"},{"author":{"_account_id":6889,"name":"Fabien Boucher","email":"fboucher@redhat.com","username":"fabien-boucher"},"change_message_id":"3db4998d9af9b9708b5abe5d92d52dff08836acd","unresolved":true,"context_lines":[{"line_number":536,"context_line":"    filename \u003d url.split(\"/\")[-1]"},{"line_number":537,"context_line":"    try:"},{"line_number":538,"context_line":"        response \u003d requests.get(url, verify\u003dinsecure, stream\u003dTrue)"},{"line_number":539,"context_line":"        if directory:"},{"line_number":540,"context_line":"            write_response_in_file(response, directory, filename)"},{"line_number":541,"context_line":"        return filename"},{"line_number":542,"context_line":"    except requests.exceptions.ContentDecodingError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"46aa359e_f6cb4060","line":539,"updated":"2023-01-30 13:26:48.000000000","message":"It seems that check is done in ensure_file_downloaded too","commit_id":"0aada82e05ca15c41787874f441aa8a0b7c74226"},{"author":{"_account_id":20676,"name":"daniel.pawlik","display_name":"Daniel Pawlik","email":"dpawlik@redhat.com","username":"daniel.pawlik"},"change_message_id":"f2087bc57f88b4995e636fabc986d2627cded4bd","unresolved":false,"context_lines":[{"line_number":536,"context_line":"    filename \u003d url.split(\"/\")[-1]"},{"line_number":537,"context_line":"    try:"},{"line_number":538,"context_line":"        response \u003d requests.get(url, verify\u003dinsecure, stream\u003dTrue)"},{"line_number":539,"context_line":"        if directory:"},{"line_number":540,"context_line":"            write_response_in_file(response, directory, filename)"},{"line_number":541,"context_line":"        return filename"},{"line_number":542,"context_line":"    except requests.exceptions.ContentDecodingError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"f6d8ec16_b6d04a1c","line":539,"in_reply_to":"46aa359e_f6cb4060","updated":"2023-01-31 14:28:35.000000000","message":"ah, right.\nLet\u0027s remove one condition in next PS","commit_id":"0aada82e05ca15c41787874f441aa8a0b7c74226"}]}
