[Piuparts-commits] [piuparts] 06/07: p-r: check for master directory separately

Holger Levsen holger at layer-acht.org
Tue Sep 12 11:59:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 912fb15bb2327765aed11e8ea1687ff064af49df
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Sep 11 14:25:54 2017 +0200

    p-r: check for master directory separately
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 piuparts-report.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/piuparts-report.py b/piuparts-report.py
index 9898121..a081e3b 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1766,7 +1766,12 @@ def main():
         doc_root = doc_root[:-1]
     problem_list = create_problem_list(global_config['known-problem-directory'])
 
-    if os.path.exists(master_directory):
+    if not os.path.exists(master_directory):
+        logging.debug("Warning: %s does not exist!?! Creating it for you now." % master_directory)
+        os.makedirs(master_directory)
+        return
+
+    if True:
         packagedb_cache = {}
         create_file(os.path.join(output_directory, "sections.yaml"),
             yaml.dump(section_names, default_flow_style=False))
@@ -1801,9 +1806,6 @@ def main():
         generate_global_summary(output_directory, section_names)
 
         logging.debug("Done")
-    else:
-        logging.debug("Warning: %s does not exist!?! Creating it for you now." % master_directory)
-        os.makedirs(master_directory)
 
 
 if __name__ == "__main__":

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list