[Git][reproducible-builds/diffoscope][master] Fix a crash when using the latest version(s) of Androguard. Thanks, hc!...

Chris Lamb (@lamby) gitlab at salsa.debian.org
Wed Oct 14 19:14:46 UTC 2026



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
d896e890 by Chris Lamb at 2026-10-14T12:14:39-07:00
Fix a crash when using the latest version(s) of Androguard. Thanks, hc! (Closes: reproducible-builds/diffoscope#434)

- - - - -


1 changed file:

- diffoscope/comparators/apk.py


Changes:

=====================================
diffoscope/comparators/apk.py
=====================================
@@ -331,11 +331,17 @@ def get_v2_signing_keys(path):
     except Exception:
         return ""
 
+    try:
+        pairs = instance._v2_blocks.items()
+    except AttributeError:
+        # Androguard >= 4.1.4-1 (approx)
+        pairs = [(b.id, b.data) for b in instance._v2_blocks]
+
     def format_key(x):
         return "\n".join(textwrap.wrap(binascii.hexlify(x).decode("utf-8")))
 
     output = []
-    for k, v in sorted(instance._v2_blocks.items()):
+    for k, v in sorted(pairs):
         output.append("Key {}:\n{}\n".format(hex(k), format_key(v)))
 
     return "\n".join(output)



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/d896e89085dfe009b83f69640d134cfea704e9ca

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/d896e89085dfe009b83f69640d134cfea704e9ca
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20261014/d59e9376/attachment.htm>


More information about the rb-commits mailing list