[Reproducible-commits] [diffoscope] 10/21: Ignore errors when reading Joliet and Rockridge data in ISO9660 images

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 17:39:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository diffoscope.

commit b9c6ab4f7dae8fbc247f724dbc72bfac0188bc1d
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sat Sep 19 18:53:06 2015 +0200

    Ignore errors when reading Joliet and Rockridge data in ISO9660 images
    
    When there's no Joliet or Rockridge data in an ISO9660 image, `isoinfo`
    will bail out with an error. Let's just ignore them because we already
    have the standard listing.
---
 diffoscope/comparators/iso9660.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/iso9660.py b/diffoscope/comparators/iso9660.py
index 6ddd966..7d91824 100644
--- a/diffoscope/comparators/iso9660.py
+++ b/diffoscope/comparators/iso9660.py
@@ -72,8 +72,12 @@ class Iso9660File(File):
     def compare_details(self, other, source=None):
         differences = []
         differences.append(Difference.from_command(ISO9660PVD, self.path, other.path))
-        for extension in (None, 'joliet', 'rockridge'):
-            differences.append(Difference.from_command(ISO9660Listing, self.path, other.path, command_args=(extension,)))
+        differences.append(Difference.from_command(ISO9660Listing, self.path, other.path))
+        for extension in ('joliet', 'rockridge'):
+            try:
+                differences.append(Difference.from_command(ISO9660Listing, self.path, other.path, command_args=(extension,)))
+            except subprocess.CalledProcessError:
+                pass # probably no joliet or rockridge data
         with LibarchiveContainer(self).open() as my_container, \
              LibarchiveContainer(other).open() as other_container:
             differences.extend(my_container.compare(other_container))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git



More information about the Reproducible-commits mailing list