[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-583-ge144d01
Andreas Beckmann
debian at abeckmann.de
Fri May 25 12:40:35 UTC 2012
The following commit has been merged in the develop branch:
commit 81c2b895fab1a81e759d6b9c072f0c209f9f758a
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Thu Apr 26 14:08:01 2012 +0200
drop LogDB.any_log_exists()
unused and rather I/O intensive method
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index dc8b631..d19cd80 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -175,22 +175,6 @@ class LogDB:
return True
return False
- def any_log_exists(self, package, subdirs):
- try:
- cache = self.basename_cache
- except AttributeError:
- self.basename_cache = {}
- cache = self.basename_cache
- package_name = package["Package"]
- for subdir in subdirs:
- for basename in self.listdir(subdir):
- if basename not in cache:
- cache[basename] = basename.split("_", 1)
- parts = cache[basename]
- if len(parts) == 2 and parts[0] == package_name:
- return True
- return False
-
def create(self, subdir, package, version, contents):
(fd, temp_name) = tempfile.mkstemp(dir=subdir)
os.close(fd)
--
piuparts git repository
More information about the Piuparts-commits
mailing list