Checksum error is returned as a straight Exception instead of a specific error

Bug #1410307 reported by Christian Reis
This bug report is a duplicate of:  Bug #1389604: Opaque gpg failures. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
New
Undecided
Unassigned

Bug Description

In bug 1404906 we run into a checksum failure likely caused by an interrupted or retried download (it's unclear what the root cause is). The exception that is raised on that error is a plain exceptions.Exception:

          File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 86, in sync
            return self.sync_products(reader, path, data, content)
          File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 318, in sync_products
            self.insert_item(item, src, target, pgree, ipath_cs)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/download_resources.py", line 200, in insert_item
            self.store, tag, checksums, size, contentsource)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/download_resources.py", line 115, in insert_root_image
            store.insert(tag, content_source, checksums, mutable=False, size=size)
          File "/usr/lib/python2.7/dist-packages/simplestreams/objectstores/__init__.py", line 166, in insert
            cksum.hexdigest(), cksum.expected))
        exceptions.Exception: unexpected checksum 'sha256' on 157dcfff1e710d216d1bad4d8fff1778d434f81ab1e8f517779fc8837c71d951 (found: 87dc32b462d1cebf466f639804ef52bb758df275fdc18fd254dc24b78344fd3d expected: 157dcfff1e710d216d1bad4d8fff1778d434f81ab1e8f517779fc8837c71d951)

Could we get a proper UnexpectedChecksumError exception instead?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.