[Reproducible-commits] [debbindiff] 09/19: Fix ls in directory comparator

Jérémy Bobbio lunar at moszumanska.debian.org
Tue Mar 31 14:59:29 UTC 2015


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

lunar pushed a commit to branch pu/feed-diff
in repository debbindiff.

commit 3facebf863ca0ef6c3e5bf0228d8d5d6c0f45904
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon Mar 30 14:10:41 2015 +0200

    Fix ls in directory comparator
---
 debbindiff/comparators/directory.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debbindiff/comparators/directory.py b/debbindiff/comparators/directory.py
index 96bc1f9..a6e1a2f 100644
--- a/debbindiff/comparators/directory.py
+++ b/debbindiff/comparators/directory.py
@@ -26,7 +26,7 @@ import debbindiff.comparators
 
 
 def ls(path):
-    return subprocess.check_output(['ls', path], shell=False).decode('utf-8')
+    return '\n'.join(sorted(subprocess.check_output(['ls', path], shell=False).decode('utf-8').splitlines()))
 
 
 @tool_required('stat')
@@ -108,8 +108,8 @@ def compare_directories(path1, path2, source=None):
                 d.add_details(compare_meta(in_path1, in_path2))
                 in_differences = [d]
         differences.extend(in_differences)
-    ls1 = sorted(ls(path1))
-    ls2 = sorted(ls(path2))
+    ls1 = ls(path1)
+    ls2 = ls(path2)
     difference = Difference.from_unicode(ls1, ls2, path1, path2, source="ls")
     if difference:
         differences.append(difference)

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



More information about the Reproducible-commits mailing list