From 302188b1690e68333a3768f2a6d261559e81ca0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudompheng?= Date: Tue, 28 Sep 2010 12:16:25 +1000 Subject: [PATCH] Make testsuite python-2.7 compatible os.walk(".") adds a prefix of "./" to filenames in python-2.7 which causes libalpm not to like archives generated in the testsuite resulting in widespread failure. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- test/pacman/pmpkg.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 48d79a35..1d55175e 100755 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -164,14 +164,8 @@ class pmpkg: # Generate package archive tar = tarfile.open(self.path, "w:gz") - - # package files - for root, dirs, files in os.walk('.'): - for d in dirs: - tar.add(os.path.join(root, d), recursive=False) - for f in files: - tar.add(os.path.join(root, f)) - + for i in os.listdir("."): + tar.add(i) tar.close() os.chdir(curdir)