[diffoscope] 01/02: comparators/directory: misc tidy-up changes
Ximin Luo
infinity0 at debian.org
Mon Jul 17 12:03:26 CEST 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository diffoscope.
commit 01391f5cfb0fbb1142a67ed7be7a0d31db50a00e
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon Jul 17 11:57:33 2017 +0200
comparators/directory: misc tidy-up changes
- make stat(1) warning textually like the other warnings
- bump stat(1) warning into an error
- use getfacl(1) before lsattr(1) as it's more general
---
diffoscope/comparators/directory.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index b88dbb4..3b195bc 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -119,10 +119,14 @@ def compare_meta(path1, path2):
try:
differences.append(Difference.from_command(Stat, path1, path2))
except RequiredToolNotFound:
- logger.warning("'stat' not found! Is PATH wrong?")
+ logger.error("Unable to find 'stat'! Is PATH wrong?")
if os.path.islink(path1) or os.path.islink(path2):
return [d for d in differences if d is not None]
try:
+ differences.append(Difference.from_command(Getfacl, path1, path2))
+ except RequiredToolNotFound:
+ logger.warning("Unable to find 'getfacl', some directory metadata differences might not be noticed.")
+ try:
lsattr1 = lsattr(path1)
lsattr2 = lsattr(path2)
differences.append(Difference.from_text(
@@ -134,10 +138,6 @@ def compare_meta(path1, path2):
))
except RequiredToolNotFound:
logger.info("Unable to find 'lsattr', some directory metadata differences might not be noticed.")
- try:
- differences.append(Difference.from_command(Getfacl, path1, path2))
- except RequiredToolNotFound:
- logger.warning("Unable to find 'getfacl', some directory metadata differences might not be noticed.")
return [d for d in differences if d is not None]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list