)]}'
{"rally/plugins/openstack/wrappers/glance.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e3b4401fb0130bf98975aa4510fb07b3d72c69ff","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        image_data \u003d None"},{"line_number":169,"context_line":"        try:"},{"line_number":170,"context_line":"            if image_location and os.path.isfile(image_location):"},{"line_number":171,"context_line":"                image_data \u003d open(image_location)"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                response \u003d requests.get(image_location)"},{"line_number":174,"context_line":"                image_data \u003d response.raw"},{"line_number":175,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":176,"context_line":"        finally:"},{"line_number":177,"context_line":"            if image_data is not None:"},{"line_number":178,"context_line":"                image_data.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_f551a1d9","line":175,"range":{"start_line":170,"start_character":12,"end_line":175,"end_character":59},"updated":"2016-03-30 13:32:28.000000000","message":"this code will fail(requests.get will be unable to retrieve data) in case of empty_location.","commit_id":"71d601e478304ee3c9df904b9dbd1c6720fb4aa5"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"c231eca9c3e48bef8e765ade1dac78832022e57a","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        image_data \u003d None"},{"line_number":169,"context_line":"        try:"},{"line_number":170,"context_line":"            if image_location and os.path.isfile(image_location):"},{"line_number":171,"context_line":"                image_data \u003d open(image_location)"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                response \u003d requests.get(image_location)"},{"line_number":174,"context_line":"                image_data \u003d response.raw"},{"line_number":175,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":176,"context_line":"        finally:"},{"line_number":177,"context_line":"            if image_data is not None:"},{"line_number":178,"context_line":"                image_data.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_ff129008","line":175,"range":{"start_line":170,"start_character":12,"end_line":175,"end_character":59},"in_reply_to":"ba0121b8_bc2709c9","updated":"2016-04-01 22:11:10.000000000","message":"You need just one check before try...finally block","commit_id":"71d601e478304ee3c9df904b9dbd1c6720fb4aa5"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"5f27abde1ebd75a9d3891f336e5c31c24882bb7c","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        image_data \u003d None"},{"line_number":169,"context_line":"        try:"},{"line_number":170,"context_line":"            if image_location and os.path.isfile(image_location):"},{"line_number":171,"context_line":"                image_data \u003d open(image_location)"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                response \u003d requests.get(image_location)"},{"line_number":174,"context_line":"                image_data \u003d response.raw"},{"line_number":175,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":176,"context_line":"        finally:"},{"line_number":177,"context_line":"            if image_data is not None:"},{"line_number":178,"context_line":"                image_data.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_bc2709c9","line":175,"range":{"start_line":170,"start_character":12,"end_line":175,"end_character":59},"in_reply_to":"ba0121b8_f551a1d9","updated":"2016-04-01 21:37:33.000000000","message":"I don\u0027t know what to do. Sorry","commit_id":"71d601e478304ee3c9df904b9dbd1c6720fb4aa5"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"98f6a5edc495dd0acce5edcd1058b2bec407e757","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            image_location \u003d os.path.expanduser(image_location)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            if image_location and os.path.isfile(image_location):"},{"line_number":99,"context_line":"                kw[\"data\"] \u003d open(image_location)"},{"line_number":100,"context_line":"            else:"},{"line_number":101,"context_line":"                kw[\"copy_from\"] \u003d image_location"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_07560229","line":98,"updated":"2016-04-04 18:40:09.000000000","message":"But as far I as I know (before) we had to specify image location in any case. \n\nWhat changed now?","commit_id":"5fe21fbc0bd2bda93817db38f381d072d71b85c1"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"9432fddce5813b9396d5958e2795c780aac0c033","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            image_location \u003d os.path.expanduser(image_location)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            if image_location and os.path.isfile(image_location):"},{"line_number":99,"context_line":"                kw[\"data\"] \u003d open(image_location)"},{"line_number":100,"context_line":"            else:"},{"line_number":101,"context_line":"                kw[\"copy_from\"] \u003d image_location"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_3c0514c2","line":98,"in_reply_to":"9a061dce_07560229","updated":"2016-04-04 19:52:02.000000000","message":"We could not specify image location when we need just a new image. For example in case of context. I saw such case in MCV team for example.","commit_id":"5fe21fbc0bd2bda93817db38f381d072d71b85c1"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"ec691adaf0bfc5bf8bca17d6424e769a7d341219","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            image_location \u003d os.path.expanduser(image_location)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            if image_location and os.path.isfile(image_location):"},{"line_number":99,"context_line":"                kw[\"data\"] \u003d open(image_location)"},{"line_number":100,"context_line":"            else:"},{"line_number":101,"context_line":"                kw[\"copy_from\"] \u003d image_location"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_3418801d","line":98,"in_reply_to":"9a061dce_3c0514c2","updated":"2016-04-05 03:50:42.000000000","message":"This actually is wrong. \n\n  try: \n    if image_location: \n      if os.path.isfile(image_location): \n        kw[\"data\"] \u003d open(image_location)\n      else:\n        kw[\"copy_from\"] \u003d image_location\n\nbecause copy_from should be URL.\n\n\nI would like to see integration tests that are covering this lines","commit_id":"5fe21fbc0bd2bda93817db38f381d072d71b85c1"}]}
