[Piuparts-commits] rev 232 - in trunk: . debian

Holger Levsen holger at alioth.debian.org
Sat Mar 14 20:21:43 UTC 2009


Author: holger
Date: 2009-03-14 20:21:42 +0000 (Sat, 14 Mar 2009)
New Revision: 232

Modified:
   trunk/debian/changelog
   trunk/piuparts-report.py
Log:
  - support sections in configuration file. 
  - TODO: different input dirs 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-03-14 20:09:07 UTC (rev 231)
+++ trunk/debian/changelog	2009-03-14 20:21:42 UTC (rev 232)
@@ -17,6 +17,8 @@
     without changelog entry.
   * piuparts-reports.py: 
     - print "unknown-package" bold in state reports.
+    - support sections in configuration file. 
+    - TODO: different input dirs 
 
  -- Holger Levsen <holger at debian.org>  Tue, 10 Mar 2009 15:23:59 +0100
 

Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py	2009-03-14 20:09:07 UTC (rev 231)
+++ trunk/piuparts-report.py	2009-03-14 20:21:42 UTC (rev 232)
@@ -256,10 +256,20 @@
 
 
 def main():
+    # For supporting multiple architectures and suites, we take a command-line
+    # argument referring to a section in the reports configuration file.  For
+    # backwards compatibility, if no argument is given, the "report" section is
+    # assumed.
+    if len(sys.argv) == 2:
+        section = sys.argv[1]
+        config = Config(section=section)
+    else:
+        section = None
+        config = Config()
+    config.read(CONFIG_FILE)
+
     setup_logging(logging.DEBUG, None)
-    config = Config()
-    config.read(CONFIG_FILE)
-    
+        
     logging.debug("Finding log files")
     dirs = ["pass", "fail", "bugged", "fixed", "reserved", "untestable"]
     logs_by_dir = {}




More information about the Piuparts-commits mailing list