incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1544983 - /incubator/public/trunk/assign_shepherds.py
Date Sun, 24 Nov 2013 14:59:14 GMT
Author: marvin
Date: Sun Nov 24 14:59:14 2013
New Revision: 1544983

URL: http://svn.apache.org/r1544983
Log:
Better error message when 'reporting' tag missing in podlings.xml.

Modified:
    incubator/public/trunk/assign_shepherds.py

Modified: incubator/public/trunk/assign_shepherds.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/assign_shepherds.py?rev=1544983&r1=1544982&r2=1544983&view=diff
==============================================================================
--- incubator/public/trunk/assign_shepherds.py (original)
+++ incubator/public/trunk/assign_shepherds.py Sun Nov 24 14:59:14 2013
@@ -330,9 +330,13 @@ class Podling(object):
             podling_id = row.getAttribute("name").strip()
             podling_id = podling_id.lower()
             podling_id = podling_id.replace(' ', '')
-            reporting = row.getElementsByTagName("reporting")[0]
-            monthly = True if reporting.getAttribute("monthly") else False
-            group = int(reporting.getAttribute("group"))
+            reporting = row.getElementsByTagName("reporting")
+            if not reporting:
+                raise Exception(
+                    "podlings.xml is missing 'reporting' for " + podling_id
+                )
+            monthly = True if reporting[0].getAttribute("monthly") else False
+            group = int(reporting[0].getAttribute("group"))
             podling = Podling(podling_id=podling_id, monthly=monthly,
                               group=group)
             podlings[podling_id] = podling



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message