)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"977cf86fb24334ae42583f8461964d2e872ec2fa","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-03-24 10:17:46 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Separate out routine for getting qemu_img_info"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Without try...catch like fetch_to_volume_format,"},{"line_number":10,"context_line":"fetch_verify_image will prevent raw image without qemu-img from"},{"line_number":11,"context_line":"running."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ffe62b97_152e2dfa","line":8,"updated":"2017-03-29 13:27:09.000000000","message":"It would be nice if the commit message explained more of what this fixes: i.e. ability to process raw images when qemu-img is not installed, etc.","commit_id":"3103d6a2affdecf39e8cd975966d3001933114a8"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"977cf86fb24334ae42583f8461964d2e872ec2fa","unresolved":false,"context_lines":[{"line_number":13,"context_line":"separate into its own routine"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I3aaf43a453e7096161780d9bfc2515c66a3a9f2c"},{"line_number":16,"context_line":"Close-Bug: #1674771"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ffe62b97_753c592e","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":9},"updated":"2017-03-29 13:27:09.000000000","message":"Closes-Bug:","commit_id":"3103d6a2affdecf39e8cd975966d3001933114a8"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2db266ec45dcdd87561bb919b3d976ccd81934dd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Separate out routine for getting qemu_img_info"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Without try...catch like fetch_to_volume_format,"},{"line_number":10,"context_line":"fetch_verify_image will prevent raw image without qemu-img from"},{"line_number":11,"context_line":"running."},{"line_number":12,"context_line":"Add try...catch for qemu_img_info for fetch_verify_image and"},{"line_number":13,"context_line":"separate into its own routine"},{"line_number":14,"context_line":"This fixes the failure if you create a volume with a raw, nonqemu image"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ffe62b97_ceb6f28a","line":11,"range":{"start_line":10,"start_character":32,"end_line":11,"end_character":7},"updated":"2017-03-29 14:25:42.000000000","message":"Can we clarify this a bit.  \u0027a raw image from being used when qemu-img is not installed.  qemu-img, however, isn\u0027t needed to make use of raw formatted images\u0027","commit_id":"0a1d73cfacb863cc7343ac7d52a2134cdc5f312b"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2db266ec45dcdd87561bb919b3d976ccd81934dd","unresolved":false,"context_lines":[{"line_number":11,"context_line":"running."},{"line_number":12,"context_line":"Add try...catch for qemu_img_info for fetch_verify_image and"},{"line_number":13,"context_line":"separate into its own routine"},{"line_number":14,"context_line":"This fixes the failure if you create a volume with a raw, nonqemu image"},{"line_number":15,"context_line":"and don\u0027t have the qemu packages on your system."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I3aaf43a453e7096161780d9bfc2515c66a3a9f2c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ffe62b97_aeb96e79","line":14,"updated":"2017-03-29 14:25:42.000000000","message":"Can you add a blank line between the paragraphs please?","commit_id":"0a1d73cfacb863cc7343ac7d52a2134cdc5f312b"}],"cinder/image/image_utils.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e3a4dea852c4f1f2f2e0bcdc914a0fd57d36d83e","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        data \u003d None"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"},{"line_number":236,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":237,"context_line":"            if image_meta:"},{"line_number":238,"context_line":"                if image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_b93dc32c","line":235,"range":{"start_line":235,"start_character":19,"end_line":235,"end_character":32},"updated":"2017-03-23 04:59:20.000000000","message":"as a follow on, maybe wrap this error handling as\nso we don\u0027t need handle it everywhere?","commit_id":"8227e5ff9fa099b529b906cecfe5e2a1c8c86214"},{"author":{"_account_id":8264,"name":"Shunli Zhou","username":"ShunliZhou"},"change_message_id":"b49c4c9bdbc234687262366486dd8f3cf175d960","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        data \u003d None"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"},{"line_number":236,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":237,"context_line":"            if image_meta:"},{"line_number":238,"context_line":"                if image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_f429029c","line":235,"range":{"start_line":235,"start_character":19,"end_line":235,"end_character":32},"in_reply_to":"1a1ced50_b93dc32c","updated":"2017-03-23 06:12:00.000000000","message":"I think do not need to wrap this error to other place. The fetch_to_volume_format function wrap qemu_img_info just to test whether qemu-img is installed. If we tested in image_utils, code will not goes to driver layer.  If wrap qemu_img_info and try...catch exception, what we can do is just throw a new exception other than the processutils throwed, maybe it\u0027s not clear the the processutils\u0027s exception. I thought to fix this bug as you describled, and i think it\u0027s not a better way and gave up.\n\nMaybe we can discuss on IRC, could you ping Shunli on IRC? I could not find your IRC id on launchpad.","commit_id":"8227e5ff9fa099b529b906cecfe5e2a1c8c86214"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"dc04c8cef0397ccf51b06b5e2a92e79937afdd61","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        data \u003d None"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"},{"line_number":236,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":237,"context_line":"            if image_meta:"},{"line_number":238,"context_line":"                if image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_dc1428ea","line":235,"range":{"start_line":235,"start_character":19,"end_line":235,"end_character":32},"in_reply_to":"1a1ced50_f429029c","updated":"2017-03-23 08:21:37.000000000","message":"I can\u0027t find you in openstack-cinder channel :)\nyou can find me in openstack-nova   id is jichen\n\nI might need to be more accurate, I think we can combine your change and https://github.com/openstack/cinder/blob/master/cinder/image/image_utils.py#L289 into a function ,so we don\u0027t need catch this exception?","commit_id":"8227e5ff9fa099b529b906cecfe5e2a1c8c86214"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e3a4dea852c4f1f2f2e0bcdc914a0fd57d36d83e","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                             \"format is not specified.  Only RAW images \""},{"line_number":249,"context_line":"                             \"can be used if qemu-img is not installed.\"),"},{"line_number":250,"context_line":"                    image_id\u003dimage_id)"},{"line_number":251,"context_line":"        fmt \u003d data.file_format"},{"line_number":252,"context_line":"        if fmt is None:"},{"line_number":253,"context_line":"            raise exception.ImageUnacceptable("},{"line_number":254,"context_line":"                reason\u003d_(\"\u0027qemu-img info\u0027 parsing failed.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_7937cb4c","line":251,"updated":"2017-03-23 04:59:20.000000000","message":"if line 235 raise exception, data will be None and if code goes there, then it will be None.file_format...","commit_id":"8227e5ff9fa099b529b906cecfe5e2a1c8c86214"},{"author":{"_account_id":8264,"name":"Shunli Zhou","username":"ShunliZhou"},"change_message_id":"b49c4c9bdbc234687262366486dd8f3cf175d960","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                             \"format is not specified.  Only RAW images \""},{"line_number":249,"context_line":"                             \"can be used if qemu-img is not installed.\"),"},{"line_number":250,"context_line":"                    image_id\u003dimage_id)"},{"line_number":251,"context_line":"        fmt \u003d data.file_format"},{"line_number":252,"context_line":"        if fmt is None:"},{"line_number":253,"context_line":"            raise exception.ImageUnacceptable("},{"line_number":254,"context_line":"                reason\u003d_(\"\u0027qemu-img info\u0027 parsing failed.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_e8d2065b","line":251,"in_reply_to":"1a1ced50_7937cb4c","updated":"2017-03-23 06:12:00.000000000","message":"I think i need to do as the fetch_to_volume_format and test on a temp file. Will fix this.","commit_id":"8227e5ff9fa099b529b906cecfe5e2a1c8c86214"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"977cf86fb24334ae42583f8461964d2e872ec2fa","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    LOG.info(msg, {\"sz\": fsz_mb, \"mbps\": mbps})"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"def get_qemu_data(image_id, image_meta, dest, run_as_root):"},{"line_number":225,"context_line":"    try:"},{"line_number":226,"context_line":"        # Use the empty tmp file to make sure qemu_img_info works."},{"line_number":227,"context_line":"        data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_35a6d1ac","line":224,"updated":"2017-03-29 13:27:09.000000000","message":"This method would be simpler if it only took disk_format as an argument rather than the whole image_meta dict.","commit_id":"3103d6a2affdecf39e8cd975966d3001933114a8"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2c680b79ee17bf6cdf85a9cb4143eb02d3af7614","unresolved":false,"context_lines":[{"line_number":313,"context_line":"    # Unfortunately it seems that you can\u0027t pipe to \u0027qemu-img convert\u0027 because"},{"line_number":314,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":315,"context_line":"    with temporary_file() as tmp:"},{"line_number":316,"context_line":"        # We may be on a system that doesn\u0027t have qemu-img installed.  That"},{"line_number":317,"context_line":"        # is ok if we are working with a RAW image.  This logic checks to see"},{"line_number":318,"context_line":"        # if qemu-img is installed.  If not we make sure the image is RAW and"},{"line_number":319,"context_line":"        # throw an exception if not.  Otherwise we stop before needing"},{"line_number":320,"context_line":"        # qemu-img.  Systems with qemu-img will always progress through the"},{"line_number":321,"context_line":"        # whole function."},{"line_number":322,"context_line":"        if image_meta is None:"},{"line_number":323,"context_line":"            disk_format \u003d None"},{"line_number":324,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ffe62b97_61ac899e","line":321,"range":{"start_line":316,"start_character":0,"end_line":321,"end_character":25},"updated":"2017-03-29 19:27:35.000000000","message":"Oops, can we move this comment to the logic it goes with?\n\nThanks!","commit_id":"50e83fb658bb89af9cb3ed1364e6fa0fe0c99f94"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"8b7932936cd899c562024a654393bde854493a5d","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    try:"},{"line_number":232,"context_line":"        # Use the empty tmp file to make sure qemu_img_info works."},{"line_number":233,"context_line":"        data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"},{"line_number":234,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":235,"context_line":"        data \u003d None"},{"line_number":236,"context_line":"        if disk_format:"},{"line_number":237,"context_line":"            if disk_format !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":12,"id":"ffe62b97_345b5ef6","line":234,"range":{"start_line":234,"start_character":4,"end_line":234,"end_character":45},"updated":"2017-03-29 21:08:24.000000000","message":"I don\u0027t think this check is narrow enough, this same error will be hit for other assorted failures: image is corrupt, prlimit is hit, etc.\n\nThis means the error messages generated below will be misleading.","commit_id":"84766bf1d04f25a47a25850ef3df26f09df1b878"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"35725b49115a75e6d3c6483b284a83d592e90366","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    try:"},{"line_number":232,"context_line":"        # Use the empty tmp file to make sure qemu_img_info works."},{"line_number":233,"context_line":"        data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"},{"line_number":234,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":235,"context_line":"        data \u003d None"},{"line_number":236,"context_line":"        if disk_format:"},{"line_number":237,"context_line":"            if disk_format !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ffe62b97_34ac7e9d","line":234,"updated":"2017-03-29 21:14:01.000000000","message":"I don\u0027t think this check is narrow enough, this same error will be hit for other assorted failures: image is corrupt, prlimit is hit, etc.\n\nThis means the error messages generated below will be misleading.","commit_id":"3ca995f413892204c1c20dbe7b48b3bdca21160e"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"1f0624b95ee3275378d1f3320c191fb7ae1c1b8a","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    try:"},{"line_number":232,"context_line":"        # Use the empty tmp file to make sure qemu_img_info works."},{"line_number":233,"context_line":"        data \u003d qemu_img_info(dest, run_as_root\u003drun_as_root)"},{"line_number":234,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":235,"context_line":"        data \u003d None"},{"line_number":236,"context_line":"        if disk_format:"},{"line_number":237,"context_line":"            if disk_format !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ffe62b97_9a7b73f3","line":234,"in_reply_to":"ffe62b97_34ac7e9d","updated":"2017-03-29 22:30:22.000000000","message":"Eric, this is how we have had it for quite some time.  How would you like to improve it?  Could we add an exception message there that reports the error, indicate we are trying to continue and then provide better explanation below?","commit_id":"3ca995f413892204c1c20dbe7b48b3bdca21160e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"80da52f0571eca9f5b4ece066bc918bf9f6890ed","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                       run_as_root\u003dTrue):"},{"line_number":256,"context_line":"    fetch(context, image_service, image_id, dest,"},{"line_number":257,"context_line":"          None, None)"},{"line_number":258,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":261,"context_line":"        if hasattr(image_meta, \u0027disk_format\u0027):"}],"source_content_type":"text/x-python","patch_set":14,"id":"ffe62b97_d1ae792c","line":258,"range":{"start_line":258,"start_character":4,"end_line":258,"end_character":54},"updated":"2017-03-30 05:15:23.000000000","message":"guess this need mock in your new test cases..","commit_id":"8364f7c6e2dda4ffc1dcdd62f6d088659a05b0f3"},{"author":{"_account_id":9194,"name":"Emily Hugenbruch","email":"ekhugenbruch@us.ibm.com","username":"ekhugen"},"change_message_id":"8c0a8bca38f5f80b890c72293090041f5b7195a7","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                       run_as_root\u003dTrue):"},{"line_number":256,"context_line":"    fetch(context, image_service, image_id, dest,"},{"line_number":257,"context_line":"          None, None)"},{"line_number":258,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":261,"context_line":"        if hasattr(image_meta, \u0027disk_format\u0027):"}],"source_content_type":"text/x-python","patch_set":14,"id":"ffe62b97_f3528fde","line":258,"range":{"start_line":258,"start_character":4,"end_line":258,"end_character":54},"in_reply_to":"ffe62b97_d1ae792c","updated":"2017-03-30 13:32:04.000000000","message":"I did mock this in the one new test case that calls fetch_verify_image, the other new ones call get_qemu_data directly, so I just mock\u0027d disk_format for those.","commit_id":"8364f7c6e2dda4ffc1dcdd62f6d088659a05b0f3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":261,"context_line":"        disk_format_raw \u003d false"},{"line_number":262,"context_line":"        has_meta \u003d true"},{"line_number":263,"context_line":"        if not image_meta:"},{"line_number":264,"context_line":"            has_meta \u003d false"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_4b0a7fd2","line":261,"range":{"start_line":261,"start_character":8,"end_line":261,"end_character":31},"updated":"2017-03-31 20:51:29.000000000","message":"Also see comments on coding style below.","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":261,"context_line":"        disk_format_raw \u003d false"},{"line_number":262,"context_line":"        has_meta \u003d true"},{"line_number":263,"context_line":"        if not image_meta:"},{"line_number":264,"context_line":"            has_meta \u003d false"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_ab910b9c","line":261,"range":{"start_line":261,"start_character":26,"end_line":261,"end_character":31},"updated":"2017-03-31 20:51:29.000000000","message":"False","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":261,"context_line":"        disk_format_raw \u003d false"},{"line_number":262,"context_line":"        has_meta \u003d true"},{"line_number":263,"context_line":"        if not image_meta:"},{"line_number":264,"context_line":"            has_meta \u003d false"},{"line_number":265,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_6b84235f","line":262,"range":{"start_line":262,"start_character":19,"end_line":262,"end_character":23},"updated":"2017-03-31 20:51:29.000000000","message":"True","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        disk_format_raw \u003d false"},{"line_number":262,"context_line":"        has_meta \u003d true"},{"line_number":263,"context_line":"        if not image_meta:"},{"line_number":264,"context_line":"            has_meta \u003d false"},{"line_number":265,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"},{"line_number":266,"context_line":"            disk_format_raw \u003d true"},{"line_number":267,"context_line":"        data \u003d get_qemu_data(image_id, has_meta, disk_format_raw,"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_8bb52734","line":264,"range":{"start_line":264,"start_character":23,"end_line":264,"end_character":28},"updated":"2017-03-31 20:51:29.000000000","message":"False","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":321,"context_line":"    # Unfortunately it seems that you can\u0027t pipe to \u0027qemu-img convert\u0027 because"},{"line_number":322,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":323,"context_line":"    with temporary_file() as tmp:"},{"line_number":324,"context_line":"        disk_format_raw \u003d false"},{"line_number":325,"context_line":"        has_meta \u003d true"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d false"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_4beeff22","line":324,"range":{"start_line":324,"start_character":26,"end_line":324,"end_character":31},"updated":"2017-03-31 20:51:29.000000000","message":"False","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":323,"context_line":"    with temporary_file() as tmp:"},{"line_number":324,"context_line":"        disk_format_raw \u003d false"},{"line_number":325,"context_line":"        has_meta \u003d true"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d false"},{"line_number":328,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_0bf8f7e2","line":325,"range":{"start_line":325,"start_character":19,"end_line":325,"end_character":23},"updated":"2017-03-31 20:51:29.000000000","message":"True","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":323,"context_line":"    with temporary_file() as tmp:"},{"line_number":324,"context_line":"        disk_format_raw \u003d false"},{"line_number":325,"context_line":"        has_meta \u003d true"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d false"},{"line_number":328,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_ab6d8b99","line":325,"range":{"start_line":325,"start_character":8,"end_line":325,"end_character":23},"updated":"2017-03-31 20:51:29.000000000","message":"We can also make this a lot easier to read.  Suggest removing the initial definition and doing:\n\nhas_meta \u003d False if not image_meta else True .\n\ndisk_format_raw \u003d True if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027 else False","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2df972063c0f0d477032cbc88c139fcdb1bc8e6d","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":323,"context_line":"    with temporary_file() as tmp:"},{"line_number":324,"context_line":"        disk_format_raw \u003d false"},{"line_number":325,"context_line":"        has_meta \u003d true"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d false"},{"line_number":328,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_4e7bad8b","line":325,"range":{"start_line":325,"start_character":8,"end_line":325,"end_character":23},"in_reply_to":"dfeb2761_4b9a7f14","updated":"2017-03-31 21:29:46.000000000","message":"Hmm, recommended changing the code to this:\nhas_meta \u003d False if not image_meta else True\ndisk_format_raw \u003d True if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027 else False","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":9194,"name":"Emily Hugenbruch","email":"ekhugenbruch@us.ibm.com","username":"ekhugen"},"change_message_id":"f4508ebfbc6888fa2bcba8d44fd1eb2ad61d9124","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":323,"context_line":"    with temporary_file() as tmp:"},{"line_number":324,"context_line":"        disk_format_raw \u003d false"},{"line_number":325,"context_line":"        has_meta \u003d true"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d false"},{"line_number":328,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_4b9a7f14","line":325,"range":{"start_line":325,"start_character":8,"end_line":325,"end_character":23},"in_reply_to":"dfeb2761_ab6d8b99","updated":"2017-03-31 21:20:31.000000000","message":"I think the commenting maybe erased some formatting?  Changed it how I think makes it a bit easier to read","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ee2699c1a2ae8d89e9c7c79c9c51b8ea370fab75","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        disk_format_raw \u003d false"},{"line_number":325,"context_line":"        has_meta \u003d true"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d false"},{"line_number":328,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"},{"line_number":329,"context_line":"            disk_format_raw \u003d true"},{"line_number":330,"context_line":"        data \u003d get_qemu_data(image_id, has_meta, disk_format_raw,"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_cbd9ef83","line":327,"range":{"start_line":327,"start_character":23,"end_line":327,"end_character":28},"updated":"2017-03-31 20:51:29.000000000","message":"False","commit_id":"2bc5c792798176f9cf2b014523e84e364e2a91fb"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"fe001b82b0c59416caa923b76f8a34f479f6ceff","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":261,"context_line":"        if not image_meta:"},{"line_number":262,"context_line":"            has_meta \u003d False"},{"line_number":263,"context_line":"        else:"},{"line_number":264,"context_line":"            has_meta \u003d True"},{"line_number":265,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"},{"line_number":266,"context_line":"            disk_format_raw \u003d True"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            disk_format_raw \u003d False"},{"line_number":269,"context_line":"        data \u003d get_qemu_data(image_id, has_meta, disk_format_raw,"},{"line_number":270,"context_line":"                             dest, run_as_root)"},{"line_number":271,"context_line":"        # We can only really do verification of the image if we have"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfeb2761_64eae975","line":268,"range":{"start_line":261,"start_character":0,"end_line":268,"end_character":35},"updated":"2017-04-03 14:33:00.000000000","message":"As we talked about in IRC these lines need to be looked at.","commit_id":"2e76e62e22e24b8b8a280e409c0585f589cafe13"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"fe001b82b0c59416caa923b76f8a34f479f6ceff","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    # Unfortunately it seems that you can\u0027t pipe to \u0027qemu-img convert\u0027 because"},{"line_number":324,"context_line":"    # it seeks. Maybe we can think of something for a future version."},{"line_number":325,"context_line":"    with temporary_file() as tmp:"},{"line_number":326,"context_line":"        if not image_meta:"},{"line_number":327,"context_line":"            has_meta \u003d False"},{"line_number":328,"context_line":"        else:"},{"line_number":329,"context_line":"            has_meta \u003d True"},{"line_number":330,"context_line":"        if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027:"},{"line_number":331,"context_line":"            disk_format_raw \u003d True"},{"line_number":332,"context_line":"        else:"},{"line_number":333,"context_line":"            disk_format_raw \u003d False"},{"line_number":334,"context_line":"        data \u003d get_qemu_data(image_id, has_meta, disk_format_raw,"},{"line_number":335,"context_line":"                             tmp, run_as_root)"},{"line_number":336,"context_line":"        if data is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfeb2761_44eda589","line":333,"range":{"start_line":326,"start_character":0,"end_line":333,"end_character":35},"updated":"2017-04-03 14:33:00.000000000","message":"And these lines.  :-)","commit_id":"2e76e62e22e24b8b8a280e409c0585f589cafe13"}]}
