community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1878446 - /comdev/reporter.apache.org/trunk/scripts/bugzillastats.py
Date Wed, 03 Jun 2020 16:21:09 GMT
Author: sebb
Date: Wed Jun  3 16:21:09 2020
New Revision: 1878446

URL: http://svn.apache.org/viewvc?rev=1878446&view=rev
Log:
using urlutils

Modified:
    comdev/reporter.apache.org/trunk/scripts/bugzillastats.py

Modified: comdev/reporter.apache.org/trunk/scripts/bugzillastats.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/bugzillastats.py?rev=1878446&r1=1878445&r2=1878446&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/bugzillastats.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/bugzillastats.py Wed Jun  3 16:21:09 2020
@@ -1,5 +1,4 @@
 import sys
-# The code uses urllib.request which is Python3
 if sys.hexversion < 0x030000F0:
     raise RuntimeError("This script requires Python3")
 """
@@ -16,7 +15,7 @@ if sys.hexversion < 0x030000F0:
 """
 import errtee
 import re
-import urllib.request
+from urlutils import URLopen
 import json
 
 BASE = "https://bz.apache.org/bugzilla/report.cgi?y_axis_field=product&ctype=csv&format=table&action=wrap"
@@ -27,7 +26,7 @@ __BUGZILLA_STATS = "../data/bugzillastat
 
 def getCSV(url):
     csv = {}
-    with urllib.request.urlopen(url) as f:
+    with URLopen(url) as f:
         lines = f.read().decode('utf-8').splitlines()
         for l in lines[1:]: # Drop header
             product, count = l.split(',')



Mime
View raw message