[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0a540f944b6f4e85072ba6dbdb757041c37ec15b

Holger Levsen holger at layer-acht.org
Sun Dec 11 09:42:25 UTC 2011


The following commit has been merged in the develop branch:
commit 0a540f944b6f4e85072ba6dbdb757041c37ec15b
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Dec 11 10:42:08 2011 +0100

    piuparts-report: create maintainer subdir if it doesn't exist.

diff --git a/debian/changelog b/debian/changelog
index 97f7122..c053521 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ piuparts (0.42) UNRELEASED; urgency=low
   * Remove Debian.NEWS entry about source in git. (Closes: #640121)
   * piuparts.py, piuparts-report.py, ChangeLog: Expand tabs to spaces.
   * Remove whitespaces from whitespace-only lines.
+  * piuparts-report: create maintainer subdir if it doesn't exist.
 
   [ Mika Pflüger ]
   * piuparts-analyze.py:
diff --git a/piuparts-report.py b/piuparts-report.py
index 1064c89..6715702 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -759,7 +759,10 @@ class Section:
             distrolinks += "</td></tr>"
 
             htmlpage = string.Template(HTML_HEADER + MAINTAINER_BODY_TEMPLATE + HTML_FOOTER)
-            filename = os.path.join(self._output_directory, "maintainer", maintainer_subdir(maintainer), maintainer + ".html")
+            maintainer_path = os.path.join(self._output_directory, "maintainer", maintainer_subdir(maintainer))
+            if not os.path.exists(maintainer_path):
+              os.mkdir(maintainer_path)
+            filename = os.path.join(maintainer_path, maintainer + ".html")
             f = file(filename, "w")
             f.write(htmlpage.safe_substitute( {
                "page_title": html_protect("Status of "+maintainer+" packages in "+self._config.section),

-- 
piuparts git repository



More information about the Piuparts-commits mailing list