[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.49-60-g87e23c3
Andreas Beckmann
anbe at debian.org
Thu Feb 21 09:40:47 UTC 2013
The following commit has been merged in the develop branch:
commit a038f3ab69bf9e51ce13ba1b2797211212ca7cd7
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Feb 5 09:47:53 2013 +0100
p-s: fold fetch_packages_file() into its only caller
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 8ad091e..3ee8949 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -510,7 +510,11 @@ class Section:
for distro in distros:
if distro not in packages_files:
try:
- packages_files[distro] = fetch_packages_file(self._config, distro)
+ packages_url = self._config.get_packages_url(distro)
+ logging.debug("Fetching %s" % packages_url)
+ f = piupartslib.open_packages_url(packages_url)
+ packages_files[distro] = piupartslib.packagesdb.PackagesFile(f)
+ f.close()
except IOError:
logging.error("failed to fetch packages file for %s" % distro)
self._error_wait_until = time.time() + 900
@@ -785,15 +789,6 @@ def create_or_replace_chroot_tgz(config, tgz, distro):
else:
os.unlink(tgz + ".old")
-def fetch_packages_file(config, distro):
- packages_url = config.get_packages_url(distro)
- logging.debug("Fetching %s" % packages_url)
- f = piupartslib.open_packages_url(packages_url)
- packages_file = piupartslib.packagesdb.PackagesFile(f)
- f.close()
-
- return packages_file
-
def create_file(filename, contents):
f = file(filename, "w")
--
piuparts git repository
More information about the Piuparts-commits
mailing list