[diffoscope] 01/02: comparators.Directory: Revert the removal of this try-except. (Closes: #868534)

Chris Lamb chris at chris-lamb.co.uk
Mon Jul 17 10:39:27 CEST 2017


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

lamby pushed a commit to branch master
in repository diffoscope.

commit 7e16cecb98ec2e874da4f3ea291e276602852dcd
Author: Chris Lamb <lamby at debian.org>
Date:   Mon Jul 17 09:35:05 2017 +0100

    comparators.Directory: Revert the removal of this try-except. (Closes: #868534)
---
 diffoscope/comparators/directory.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 2f6289d..5b34a41 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -164,11 +164,14 @@ class FilesystemDirectory(Directory):
 
     def compare(self, other, source=None):
         differences = []
-        listing_diff = Difference.from_text('\n'.join(list_files(self.path)),
-                                            '\n'.join(list_files(other.path)),
-                                            self.path, other.path, source='file list')
-        if listing_diff:
-            differences.append(listing_diff)
+        try:
+            listing_diff = Difference.from_text('\n'.join(list_files(self.path)),
+                                                '\n'.join(list_files(other.path)),
+                                                self.path, other.path, source='file list')
+            if listing_diff:
+                differences.append(listing_diff)
+        except RequiredToolNotFound:
+            logger.info("Unable to find 'getfacl'.")
         differences.extend(compare_meta(self.name, other.name))
 
         my_container = DirectoryContainer(self)

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


More information about the diffoscope mailing list