[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. eda668423fa87898c59d1075118693714aa5a053

Holger Levsen holger at layer-acht.org
Fri Dec 23 10:28:33 UTC 2011


The following commit has been merged in the master branch:
commit f62513ca86527123a8d34e0c974051a6a7e4a67c
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Dec 11 19:40:30 2011 +0100

    make sure maintainer_subdir is known before referenced

diff --git a/piuparts-report.py b/piuparts-report.py
index ea368d6..fbcf16e 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -735,6 +735,9 @@ class Section:
         states = ["fail", "unknown", "pass"]
         for maintainer in maintainers.keys():
             sources = maintainers[maintainer]
+            maintainer_subdir = os.path.join(maintainer_dir, maintainer_subdir(maintainer))
+            if not os.path.exists(maintainer_subdir):
+              os.mkdir(maintainer_subdir)
             rows = ""
             package_rows = ""
             packages = {}
@@ -762,9 +765,6 @@ class Section:
             distrolinks += "</td></tr>"
 
             htmlpage = string.Template(HTML_HEADER + MAINTAINER_BODY_TEMPLATE + HTML_FOOTER)
-            maintainer_subdir = os.path.join(maintainer_dir, maintainer_subdir(maintainer))
-            if not os.path.exists(maintainer_subdir):
-              os.mkdir(maintainer_subdir)
             filename = os.path.join(maintainer_subdir, maintainer + ".html")
             f = file(filename, "w")
             f.write(htmlpage.safe_substitute( {

-- 
piuparts git repository



More information about the Piuparts-commits mailing list