status-report-scripts bugzillaReport.py,1.2,1.3

Rakesh Pandit rakesh at fedoraproject.org
Tue Nov 18 05:53:05 UTC 2008


Author: rakesh

Update of /cvs/fedora/status-report-scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25988

Modified Files:
	bugzillaReport.py 
Log Message:
Brian Pepple <bpepple at fedoraproject.org> patch - improves output messages and prints total number of pakages


Index: bugzillaReport.py
===================================================================
RCS file: /cvs/fedora/status-report-scripts/bugzillaReport.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bugzillaReport.py	12 Nov 2008 01:31:38 -0000	1.2
+++ bugzillaReport.py	18 Nov 2008 05:53:05 -0000	1.3
@@ -186,10 +186,10 @@
 help="Password for Bugzilla authentication.")
 # Start date
 parser.add_option("-s", "--start", action="store", dest="start_date", \
-help="Start date for report.")
+help="Start date for report. Format: d/m/Y")
 # End date
 parser.add_option("-e", "--end", action="store", dest="end_date", \
-help="End date for report generation.")
+help="End date for report generation. Format: d/m/Y")
 
 options = {}
 args = []
@@ -266,7 +266,7 @@
 
 bz = Bugzilla(url=url, username=username, password=password)
 if verbose:
-    print "Quering. Getting all package review bugs (be patient, it may take too long) ...."
+    print "Getting all package review bugs (be patient, this may take a while) ...."
 bug_list = bz.query(query_dict)
 if verbose:
     print "Total number of Package Reviews:", len(bug_list)
@@ -301,12 +301,19 @@
 list_of_names.sort(cmp)
 
 file = open('output.txt', 'w')
-file.write("From: "  + str(start) + "\n")
-file.write("Upto: " + str(end) + "\n")
+file.write("Start Date: "  + str(start) + "\n")
+file.write("End Date: " + str(end) + "\n")
+file.write('\n')
+
+# Variable to hold total number of reviews
+total_reviews = 0
+
 for i in range(0, list_of_names.__len__()):
     file.write(list_of_names[i].encode('utf-8') + " - " + str(result[list_of_names[i]]))
     file.write('\n')
+    total_reviews = total_reviews + result[list_of_names[i]]
+file.write('\n')
+file.write("Total reviews: " + str(total_reviews))
 file.close()
 
-
 # File ends here




More information about the fedora-extras-commits mailing list