)]}'
{"oslo_utils/imageutils/format_inspector.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b943516e89dc16df7b5954dfd879c461387544c","unresolved":true,"context_lines":[{"line_number":1854,"context_line":""},{"line_number":1855,"context_line":"        # A bootable ISO may contain a GPT protective MBR. In that case both"},{"line_number":1856,"context_line":"        # inspectors legitimately match the image, but the image format is"},{"line_number":1857,"context_line":"        # ISO (see the formats property documentation above)."},{"line_number":1858,"context_line":"        match_names \u003d {str(match) for match in matches}"},{"line_number":1859,"context_line":"        if match_names \u003d\u003d {\u0027iso\u0027, \u0027gpt\u0027}:"},{"line_number":1860,"context_line":"            matches \u003d [match for match in matches if str(match) \u003d\u003d \u0027iso\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"c7e91f16_988b41f8","line":1857,"updated":"2026-10-02 17:47:53.000000000","message":"This is exactly why we\u0027re raising here -- if you call format() you\u0027re expecting a single format without any other wrappers (read: risk). The formats() call above is what you need to use if you want to tolerate multiple matches and apply your own policy about what is acceptable. For example, here\u0027s where glance makes this determination:\n\nhttps://review.opendev.org/c/openstack/glance/+/963868\n\nThis change not only affects what other services will accept that depend on this only matching if a single format is detected but also sort of breaks the semantic meaning of the call. The docstring above says:\n\n\u003e If more than one format matched, then ImageFormatError is raised\n\nThat\u0027s the expected behavior here. Not \"if more than one format matches but they\u0027re commonly used together, we\u0027ll just ignore and pick the one we think you want.\"\n\nYour bug doesn\u0027t actually show the scenario you\u0027re hitting here, but I would expect it\u0027s glance, is that right? If so and you\u0027re running a version of glance with the above patch applied, it would be better to discuss in the context of what about glance\u0027s image approval is not working the way you expect instead of assigning this behavior as a bug in the low-level library.","commit_id":"688449ace570fd82bdf3dcbebd1aa0f2e548cd67"}]}
