[Reproducible-commits] [debbindiff] 01/01: Make sure variables are defined
Reiner Herrmann
reiner at reiner-h.de
Mon Jun 22 22:17:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository debbindiff.
commit 03aae3ab88aa586860106a9d8b8e0f46ba215292
Author: Reiner Herrmann <reiner at reiner-h.de>
Date: Tue Jun 23 00:14:11 2015 +0200
Make sure variables are defined
---
debbindiff/comparators/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/debbindiff/comparators/__init__.py b/debbindiff/comparators/__init__.py
index 23ec04f..bba46d5 100644
--- a/debbindiff/comparators/__init__.py
+++ b/debbindiff/comparators/__init__.py
@@ -112,6 +112,7 @@ SMALL_FILE_THRESHOLD = 65536 # 64 kiB
def compare_files(path1, path2, source=None):
if os.path.islink(path1) or os.path.islink(path2):
+ dest1, dest2 = None, None
try:
dest1 = os.readlink(path1)
text1 = "%s -> %s" % (path1, dest1)
@@ -124,7 +125,7 @@ def compare_files(path1, path2, source=None):
except OSError:
text2 = "[ No symlink ]"
- if dest1 == dest2:
+ if dest1 and dest2 and dest1 == dest2:
return []
return [Difference.from_unicode(text1, text2, path1, path2, source=source, comment="symlink")]
--
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