[Reproducible-commits] [debbindiff] 02/10: tar: remove temporary file after comparison

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 29 18:29:23 UTC 2014


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

lunar pushed a commit to branch master
in repository debbindiff.

commit ea347c2aba8cfbc394f1373430335d69fce9f094
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon Sep 29 16:54:35 2014 +0200

    tar: remove temporary file after comparison
---
 debbindiff/comparators/tar.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/debbindiff/comparators/tar.py b/debbindiff/comparators/tar.py
index 65af2de..b294ddd 100644
--- a/debbindiff/comparators/tar.py
+++ b/debbindiff/comparators/tar.py
@@ -55,11 +55,14 @@ def compare_tar_files(path1, path2, source=None):
                         logger.debug('extract member %s' % (name,))
                         tar1.extract(name, temp_dir1)
                         tar2.extract(name, temp_dir2)
+                        in_path1 = os.path.join(temp_dir1, name)
+                        in_path2 = os.path.join(temp_dir2, name)
                         content_differences.extend(
                             debbindiff.comparators.compare_files(
-                                os.path.join(temp_dir1, name),
-                                os.path.join(temp_dir2, name),
+                                in_path1, in_path2,
                                 source=name))
+                        os.unlink(in_path1)
+                        os.unlink(in_path2)
             # look up differences in file list and file metadata
             content1 = get_tar_content(tar1)
             content2 = get_tar_content(tar2)
@@ -72,5 +75,3 @@ def compare_tar_files(path1, path2, source=None):
         return [difference]
     else:
         return []
-
-

-- 
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