[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.42-60-gc91096b

Holger Levsen holger at layer-acht.org
Sun Apr 1 07:55:58 UTC 2012


The following commit has been merged in the piatti branch:
commit c91096b64217ce037d297e75bf8a9fc0726fa244
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Apr 1 09:55:41 2012 +0200

    * piuparts-report: don't create output for disabled sections. (Bye bye Lenny!)

diff --git a/debian/changelog b/debian/changelog
index 3f0cf4f..c2bbeed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,9 @@ piuparts (0.44) UNRELEASED; urgency=low
   [ Holger Levsen ]
   * Enable automatic bug updating in piuparts-analyse: if a bug is not closed
     in a new version, it can rather very savely be assumed it's not closed.
+    This has been disabled again.
+  * piuparts-report: don't create output for disabled sections. (Bye bye
+    Lenny!)
 
  -- Holger Levsen <holger at debian.org>  Sun, 22 Jan 2012 13:33:59 +0100
 
diff --git a/piuparts-report.py b/piuparts-report.py
index 7bf3d31..4108b22 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1081,20 +1081,22 @@ class Section:
 
 
     def generate_output(self, master_directory, output_directory, section_names):
-        self._section_names = section_names
-        self._master_directory = os.path.abspath(os.path.join(master_directory, self._config.section))
-        if not os.path.exists(self._master_directory):
-            logging.debug("Warning: %s did not exist, now created. Did you ever let the slave work?" % (self._master_directory, self._config.section))
-            os.mkdir(self._master_directory)
-
-        self._output_directory = os.path.abspath(os.path.join(output_directory, self._config.section))
-        if not os.path.exists(self._output_directory):
-            os.mkdir(self._output_directory)
-
-        oldcwd = os.getcwd()
-        os.chdir(self._master_directory)
-        self.generate_html()
-        os.chdir(oldcwd)
+        # generate output only if section is not disabled
+        if self._config["max-reserved"] != 0:
+            self._section_names = section_names
+            self._master_directory = os.path.abspath(os.path.join(master_directory, self._config.section))
+            if not os.path.exists(self._master_directory):
+                logging.debug("Warning: %s did not exist, now created. Did you ever let the slave work?" % (self._master_directory, self._config.section))
+                os.mkdir(self._master_directory)
+
+            self._output_directory = os.path.abspath(os.path.join(output_directory, self._config.section))
+            if not os.path.exists(self._output_directory):
+                os.mkdir(self._output_directory)
+
+            oldcwd = os.getcwd()
+            os.chdir(self._master_directory)
+            self.generate_html()
+            os.chdir(oldcwd)
 
 
 def main():

-- 
piuparts git repository



More information about the Piuparts-commits mailing list