[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.42-59-gc28b2f1
Andreas Beckmann
debian at abeckmann.de
Sat Mar 10 09:08:47 UTC 2012
The following commit has been merged in the develop branch:
commit 2e594f7ba5fe69c39df0e14fe90a2dbcbc89092b
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Mon Mar 5 17:57:36 2012 +0100
do not leak the log file descriptor
use open(..., "we") to set FD_CLOEXEC
(may not be entirely portable, but works on glibc systems)
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index 17bf217..d2b7886 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ piuparts (0.44) UNRELEASED; urgency=low
* piuparts-master.py:
- Implement simple section locking to allow concurrent master instances
but allow only one instance per section.
+ * piuparts-slave.py:
+ - Do not leak the logfile file descriptor to piuparts.
* piuparts-report.py:
- Add link to the list of untestable logs.
- Add more known problem reports: forgotten alternatives, warnings in
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 5421650..8366d8c 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -410,7 +410,7 @@ def test_package(config, package, packages_files):
output_name = log_name(package["Package"], package["Version"])
logging.debug("Opening log file %s" % output_name)
new_name = os.path.join("new", output_name)
- output = file(new_name, "w")
+ output = file(new_name, "we")
output.write(time.strftime("Start: %Y-%m-%d %H:%M:%S %Z\n",
time.gmtime()))
output.write("\n")
--
piuparts git repository
More information about the Piuparts-commits
mailing list