[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-590-gbc1e138
Andreas Beckmann
debian at abeckmann.de
Sun May 27 09:05:34 UTC 2012
The following commit has been merged in the develop branch:
commit bc1e138d16f2a9dbf673525a5210689f44b9ac5d
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Fri May 25 22:40:15 2012 +0200
p-r: revert indenting change from c91096b
turn
if condition:
block
into
if not condition:
return
block
(to avoid unrelated merge problems later on)
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piuparts-report.py b/piuparts-report.py
index 7bac7c2..af63099 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1078,22 +1078,24 @@ class Section:
def generate_output(self, master_directory, output_directory, section_names):
- # generate output only if section is not disabled
- if int(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)
+ # skip output generation for disabled sections
+ if int(self._config["max-reserved"]) == 0:
+ return
+
+ 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