[Git][reproducible-builds/diffoscope][master] comparators.java: properly fall back from procyon to javap also when procyon…

Mattia Rizzolo gitlab at salsa.debian.org
Thu Oct 25 14:18:55 CEST 2018


Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope


Commits:
c8f1ccc9 by Mattia Rizzolo at 2018-10-25T12:18:17Z
comparators.java: properly fall back from procyon to javap also when procyon exists but doesn't return any output

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


1 changed file:

- diffoscope/comparators/java.py


Changes:

=====================================
diffoscope/comparators/java.py
=====================================
@@ -80,14 +80,17 @@ class ClassFile(File):
     decompilers = [ProcyonDecompiler, Javap]
 
     def compare_details(self, other, source=None):
-        diff = None
+        diff = []
 
         for decompiler in self.decompilers:
             try:
-                diff = [
-                    Difference.from_command(decompiler, self.path, other.path)
-                ]
-                if diff:
+                single_diff = Difference.from_command(
+                    decompiler,
+                    self.path,
+                    other.path
+                )
+                if single_diff:
+                    diff.append(single_diff)
                     break
             except RequiredToolNotFound:
                 logger.debug("Unable to find %s. Falling back...",



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

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/c8f1ccc932567748ced8b492370b99a8948780c8
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20181025/386d0a4f/attachment.html>


More information about the rb-commits mailing list