)]}'
{"nova/virt/libvirt/driver.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@linecorp.com","username":"masa"},"change_message_id":"cd88a7b5390e59defa62e5e91ade4e2dfeef6e0f","unresolved":true,"context_lines":[{"line_number":11884,"context_line":"                if qemu_img_info.backing_file:"},{"line_number":11885,"context_line":"                    backing_file \u003d os.path.basename(qemu_img_info.backing_file)"},{"line_number":11886,"context_line":"                else:"},{"line_number":11887,"context_line":"                    backing_file \u003d qemu_img_info.backing_file"},{"line_number":11888,"context_line":"                over_commit_size \u003d int(virt_size) - dk_size"},{"line_number":11889,"context_line":""},{"line_number":11890,"context_line":"            elif disk_type \u003d\u003d \u0027file\u0027 and driver_type \u003d\u003d \u0027qcow2\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"b7e21348_7f12e99c","line":11887,"updated":"2024-12-24 09:26:02.000000000","message":"I\u0027m not sure the Nova\u0027s coding style, but the `libvirt_utils.get_disk_backing_file` method looks an utility method to hide the if-block. This change could update the `get_disk_backing_file` side, instead of the driver side change.\n\n```\ndef get_disk_backing_file(\n    path: str, basename: bool \u003d True, format: ty.Optional[str] \u003d None, img_obj: object \u003d None\n) -\u003e ty.Optional[str]:\n    ....\n    if img_obj:\n        backing_file \u003d img_obj.backing_file\n    else:\n        backing_file \u003d images.qemu_img_info(path, format).backing_file\n```","commit_id":"18c25829100989faa9a4871d5e844d7864509fa5"}]}
