status-report-scripts pyGetReviewByFlags,1.14,1.15
Jason ティビツ (tibbs)
fedora-extras-commits at redhat.com
Fri Aug 8 20:08:57 UTC 2008
Author: tibbs
Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21883
Modified Files:
pyGetReviewByFlags
Log Message:
Initial attempts to get things running again.
Index: pyGetReviewByFlags
===================================================================
RCS file: /cvs/fedora/status-report-scripts/pyGetReviewByFlags,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- pyGetReviewByFlags 20 Jun 2008 19:56:04 -0000 1.14
+++ pyGetReviewByFlags 8 Aug 2008 20:08:56 -0000 1.15
@@ -10,8 +10,10 @@
import bugzilla
+import codecs
import datetime
import glob
+import operator
import os
import sys
import tempfile
@@ -31,8 +33,8 @@
# 'FLAG' : (baseFlagFilename, openMsg, closeMsg),
# Disable as ACCEPT is having problems regenerating due to its ever growing
# size.
-# '+': ('ACCEPT.html', "Accepted, but still open, tickets",
-# "Accepted tickets"),
+ '+': ('ACCEPT.html', "Accepted, but still open, tickets",
+ "Accepted tickets"),
'-': ('REJECT.html', "Rejected, but still open, tickets",
"Rejected tickets"),
'?': ('REVIEW.html', "Tickets being reviewed",
@@ -67,13 +69,12 @@
<title>Cached Bugzilla Review Tracker</title>
<style type="text/css" media="screen">
<!--
- @import url("https://bugzilla.redhat.com/bugzilla/css/master.css");
+ @import url("https://bugzilla.redhat.com/bugzilla/skins/standard/global.css");
-->
.UNASSIGNED {background-color: #99f};
</style>
- <link href="css/buglist.css" rel="stylesheet" type="text/css"/>
- <script src="js/functions.js" type="text/javascript" language="javascript"></script>
+ <link href="skins/standard/buglist.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="innerWrap">
@@ -111,6 +112,7 @@
querydata['value0-0-0'] = "fedora-review" + flag
bugs = filter(lambda b: str(b.bug_id) not in trackers, bz.query(querydata))
+ bugs.sort(key=operator.attrgetter('bug_id'))
closedCnt = 0
notClosedCnt = 0
@@ -128,9 +130,9 @@
alldeps |= bugdata[bug.bug_id]['depends']
# Now look up info on everything that blocks any review ticket, so we can check their status
- for bug in filter(None, bz.getbugssimple(alldeps)):
- if bug.bug_status == 'CLOSED':
- closeddeps.add(str(bug.bug_id))
+# for bug in filter(None, bz.getbugssimple(alldeps)):
+# if bug.bug_status == 'CLOSED':
+# closeddeps.add(str(bug.bug_id))
def opendep(id): return id not in closeddeps
for bug in bugs:
@@ -266,7 +268,7 @@
tmpdir = tempfile.mkdtemp(dir=options.dirname)
fname = os.path.join(tmpdir, "NEW.html")
try:
- f = open(fname, "w")
+ f = codecs.open(fname, "w", 'utf-8')
except IOError, (err, strerr):
print 'ERROR: %s: %s' % (strerr, fname)
sys.exit(1)
@@ -282,7 +284,7 @@
for flag in flagData.keys():
try:
- f = open(os.path.join(tmpdir, flagData[flag][0]), "w")
+ f = codecs.open(os.path.join(tmpdir, flagData[flag][0]), "w", 'utf-8')
except IOError, (err, strerr):
print 'ERROR: %s: %s' % (strerr, flagData[flag][0])
sys.exit(1)
More information about the fedora-extras-commits
mailing list