[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.42-14-g5c2eadd
Andreas Beckmann
debian at abeckmann.de
Mon Jan 9 17:10:54 UTC 2012
The following commit has been merged in the piatti branch:
commit 0f0d11cddf54af090661593ae5692cf87624f628
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sun Jan 8 18:47:29 2012 +0100
fix scope of chdir
always switch back to the old directory, otherwise we could
fail with non-absolute paths
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 436900a..3c89a3e 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -296,6 +296,7 @@ class Section:
oldcwd = os.getcwd()
os.chdir(self._slave_directory)
+ test_count = 0
for logdir in ["pass", "fail", "untestable"]:
for basename in os.listdir(logdir):
@@ -312,8 +313,6 @@ class Section:
self._slave.get_status()
self._slave.close()
- test_count = len(self._slave.get_reserved())
-
if self._slave.get_reserved():
self._check_tarball()
packages_files = {}
@@ -334,6 +333,7 @@ class Section:
packages_file = packages_files[distro]
for package_name, version in self._slave.get_reserved():
+ test_count += 1
if package_name in packages_file:
package = packages_file[package_name]
if version == package["Version"] or self._config["upgrade-test-distros"]:
@@ -347,9 +347,9 @@ class Section:
log_name(package_name, version)),
"Package %s not found" % package_name)
self._slave.forget_reserved(package_name, version)
- os.chdir(oldcwd)
- return( test_count )
+ os.chdir(oldcwd)
+ return test_count
def log_name(package, version):
--
piuparts git repository
More information about the Piuparts-commits
mailing list