[pacman-dev] [PATCH 1/2] pactest: use simpler method to create tar

Xavier Chantry chantry.xavier at gmail.com
Sun Oct 10 19:05:03 EDT 2010


just like in 24fc623e1a8bf905cf0367f9bd40bc5bd6034378 , apply to pmdb
gensync as well.
---
 test/pacman/pmdb.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py
index 41bd738..11083db 100755
--- a/test/pacman/pmdb.py
+++ b/test/pacman/pmdb.py
@@ -346,11 +346,8 @@ def gensync(self, path):
         mkdir(path)
         archive = os.path.join(path, "%s.db" % (self.treename))
         tar = tarfile.open(archive, "w:gz")
-        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)
-- 
1.7.3.1



More information about the pacman-dev mailing list