[Reproducible-commits] [debbindiff] 02/03: Fix label for content of gzip, bzip2, and xz files
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat Aug 1 22:42:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository debbindiff.
commit 426e871943308e1860093cb571917019ee8a5c78
Author: Jérémy Bobbio <lunar at debian.org>
Date: Sat Aug 1 15:06:03 2015 +0000
Fix label for content of gzip, bzip2, and xz files
---
debbindiff/comparators/bzip2.py | 3 +++
debbindiff/comparators/gzip.py | 3 +++
debbindiff/comparators/xz.py | 3 +++
3 files changed, 9 insertions(+)
diff --git a/debbindiff/comparators/bzip2.py b/debbindiff/comparators/bzip2.py
index 5026337..1a00445 100644
--- a/debbindiff/comparators/bzip2.py
+++ b/debbindiff/comparators/bzip2.py
@@ -55,6 +55,9 @@ class Bzip2Container(Archive):
def compare(self, other, source=None):
my_file = self.get_member(self.get_member_names()[0])
other_file = other.get_member(other.get_member_names()[0])
+ source = None
+ if my_file.name == other_file.name:
+ source = my_file.name
return [debbindiff.comparators.compare_files(my_file, other_file, source)]
diff --git a/debbindiff/comparators/gzip.py b/debbindiff/comparators/gzip.py
index da6903f..a60f458 100644
--- a/debbindiff/comparators/gzip.py
+++ b/debbindiff/comparators/gzip.py
@@ -57,6 +57,9 @@ class GzipContainer(Archive):
def compare(self, other, source=None):
my_file = self.get_member(self.get_member_names()[0])
other_file = other.get_member(other.get_member_names()[0])
+ source = None
+ if my_file.name == other_file.name:
+ source = my_file.name
return [debbindiff.comparators.compare_files(my_file, other_file, source)]
diff --git a/debbindiff/comparators/xz.py b/debbindiff/comparators/xz.py
index 17366ff..6abb909 100644
--- a/debbindiff/comparators/xz.py
+++ b/debbindiff/comparators/xz.py
@@ -56,6 +56,9 @@ class XzContainer(Archive):
def compare(self, other, source=None):
my_file = self.get_member(self.get_member_names()[0])
other_file = other.get_member(other.get_member_names()[0])
+ source = None
+ if my_file.name == other_file.name:
+ source = my_file.name
return [debbindiff.comparators.compare_files(my_file, other_file, source)]
--
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