[diffoscope] 01/05: Tidy comparators/missing_file.py
chris at chris-lamb.co.uk
Wed Dec 28 13:45:09 CET 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
Author: Chris Lamb <lamby at debian.org>
Date: Wed Dec 28 12:36:55 2016 +0000
diffoscope/comparators/missing_file.py | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/diffoscope/comparators/missing_file.py b/diffoscope/comparators/missing_file.py
index fb9cde8..89712ad 100644
@@ -23,12 +23,14 @@ from diffoscope import logger
from diffoscope.config import Config
from diffoscope.difference import Difference
-from .utils.file import File
from .binary import FilesystemFile
+from .utils.file import File
- """Represents a missing file when comparing containers"""
+ Represents a missing file when comparing containers.
@@ -66,15 +68,24 @@ class MissingFile(File):
def compare(self, other, source=None):
- # So now that comparators are all object-oriented, we don't have any clue on how to
- # perform a meaningful comparison right here. So we are good do the comparison backward
- # (where knowledge of the file format lies) and and then reverse it.
+ # So now that comparators are all object-oriented, we don't have any
+ # clue on how to perform a meaningful comparison right here. So we are
+ # good do the comparison backward (where knowledge of the file format
+ # lies) and and then reverse it.
if isinstance(other, MissingFile):
- return Difference(None, self.name, other.name, comment='Trying to compare two non-existing files.')
- logger.debug('Performing backward comparison')
+ return Difference(
+ comment="Trying to compare two non-existing files."
+ logger.debug("Performing backward comparison")
backward_diff = other.compare(self, source)
if not backward_diff:
# Be nice to text comparisons
@@ -97,4 +108,3 @@ class MissingFile(File):
get_as_string = lambda self, _: ''
return DummyChanges(Files=, Version='')
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope