[diffoscope] 01/01: Tidy get_compressed_content_name.

Chris Lamb chris at chris-lamb.co.uk
Sun Mar 19 22:53:50 CET 2017


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

lamby pushed a commit to branch experimental
in repository diffoscope.

commit 1165c204b3d13619285c8fa05e6efdbe4f6c9a14
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Mar 19 21:40:17 2017 +0000

    Tidy get_compressed_content_name.
---
 diffoscope/comparators/utils/filenames.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/diffoscope/comparators/utils/filenames.py b/diffoscope/comparators/utils/filenames.py
index 9269c2f..83e534f 100644
--- a/diffoscope/comparators/utils/filenames.py
+++ b/diffoscope/comparators/utils/filenames.py
@@ -22,8 +22,8 @@ import os
 
 def get_compressed_content_name(path, expected_extension):
     basename = os.path.basename(path)
-    if basename.endswith(expected_extension):
-        name = basename[:-len(expected_extension)]
-    else:
-        name = "%s-content" % basename
-    return name
+
+    if not basename.endswith(expected_extension):
+        return "%s-content" % basename
+
+    return basename[:-len(expected_extension)]

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


More information about the diffoscope mailing list