summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-15 00:02:59 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-04-15 00:02:59 (GMT)
commit9931fe6c59d330d0dbeea1c51456e3a9f94377d8 (patch)
tree0e17c9808475e40bfad54db43529ad01d411e6c2 /bin
parent12ec17eedc70ee82421b27ff7dd84e947d4e6953 (diff)
downloadSCons-9931fe6c59d330d0dbeea1c51456e3a9f94377d8.zip
SCons-9931fe6c59d330d0dbeea1c51456e3a9f94377d8.tar.gz
SCons-9931fe6c59d330d0dbeea1c51456e3a9f94377d8.tar.bz2
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Apply the first part of the 'raise' fixer (the three-argument cases are not converted and will need to wait until native support of with_traceback() is available).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/xmlagenda.py76
1 files changed, 38 insertions, 38 deletions
diff --git a/bin/xmlagenda.py b/bin/xmlagenda.py
index fb62f9a..7937331 100755
--- a/bin/xmlagenda.py
+++ b/bin/xmlagenda.py
@@ -21,19 +21,19 @@ team = sorted('Steven Gary Greg Ken Jim David Bill Sergey Jason'.split())
# The elements to be picked out of the issue
PickList = [
- # sort key -- these are used to sort the entry
- 'target_milestone', 'priority', 'votes_desc', 'creation_ts',
- # payload -- these are displayed
- 'issue_id', 'votes', 'issue_type', 'target_milestone',
- 'priority', 'assigned_to', 'short_desc',
- ]
+ # sort key -- these are used to sort the entry
+ 'target_milestone', 'priority', 'votes_desc', 'creation_ts',
+ # payload -- these are displayed
+ 'issue_id', 'votes', 'issue_type', 'target_milestone',
+ 'priority', 'assigned_to', 'short_desc',
+ ]
# Conbert a leaf element into its value as a text string
# We assume it's "short enough" that there's only one substring
def Value(element):
- v = element.firstChild
- if v is None: return ''
- return v.nodeValue
+ v = element.firstChild
+ if v is None: return ''
+ return v.nodeValue
# Parse the XML issues file and produce a DOM for it
import sys
@@ -46,26 +46,26 @@ xml = parse(xml)
# and put them in our list of issues.
issues = []
for issuezilla in xml.childNodes:
- # The Issuezilla element contains the issues
- if issuezilla.nodeType != issuezilla.ELEMENT_NODE: continue
- for issue in issuezilla.childNodes:
- # The issue elements contain the info for an issue
- if issue.nodeType != issue.ELEMENT_NODE: continue
- # Accumulate the pieces we want to include
- d = {}
- for element in issue.childNodes:
- if element.nodeName in PickList:
- d[element.nodeName] = Value(element)
- # convert 'votes' to numeric, ascending and descending
- try:
- v = int('0' + d['votes'])
- except KeyError:
- pass
- else:
- d['votes_desc'] = -v
- d['votes'] = v
- # Marshal the elements and add them to the list
- issues.append([ d[ix] for ix in PickList ])
+ # The Issuezilla element contains the issues
+ if issuezilla.nodeType != issuezilla.ELEMENT_NODE: continue
+ for issue in issuezilla.childNodes:
+ # The issue elements contain the info for an issue
+ if issue.nodeType != issue.ELEMENT_NODE: continue
+ # Accumulate the pieces we want to include
+ d = {}
+ for element in issue.childNodes:
+ if element.nodeName in PickList:
+ d[element.nodeName] = Value(element)
+ # convert 'votes' to numeric, ascending and descending
+ try:
+ v = int('0' + d['votes'])
+ except KeyError:
+ pass
+ else:
+ d['votes_desc'] = -v
+ d['votes'] = v
+ # Marshal the elements and add them to the list
+ issues.append([ d[ix] for ix in PickList ])
issues.sort()
# Transcribe the issues into comma-separated values.
@@ -74,16 +74,16 @@ import csv
writer = csv.writer(open('editlist.csv', 'w'))
# header
writer.writerow(['ID', 'Votes', 'Type/Member', 'Milestone',
- 'Pri', 'Owner', 'Summary/Comments'])
+ 'Pri', 'Owner', 'Summary/Comments'])
for issue in issues:
- row = issue[4:] # strip off sort key
- #row[0] = """=hyperlink("http://scons.tigris.org/issues/show_bug.cgi?id=%s","%s")""" % (row[0],row[0])
- if row[3] == '-unspecified-': row[3] = 'triage'
- writer.writerow(['','','','','','',''])
- writer.writerow(row)
- writer.writerow(['','','consensus','','','',''])
- writer.writerow(['','','','','','',''])
- for member in team: writer.writerow(['','',member,'','','',''])
+ row = issue[4:] # strip off sort key
+ #row[0] = """=hyperlink("http://scons.tigris.org/issues/show_bug.cgi?id=%s","%s")""" % (row[0],row[0])
+ if row[3] == '-unspecified-': row[3] = 'triage'
+ writer.writerow(['','','','','','',''])
+ writer.writerow(row)
+ writer.writerow(['','','consensus','','','',''])
+ writer.writerow(['','','','','','',''])
+ for member in team: writer.writerow(['','',member,'','','',''])
# Local Variables:
# tab-width:4