community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1867078 - /comdev/reporter.apache.org/trunk/scripts/pdata.py
Date Tue, 17 Sep 2019 21:28:37 GMT
Author: sebb
Date: Tue Sep 17 21:28:37 2019
New Revision: 1867078

URL: http://svn.apache.org/viewvc?rev=1867078&view=rev
Log:
Replace deprecated method

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

Modified: comdev/reporter.apache.org/trunk/scripts/pdata.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/pdata.py?rev=1867078&r1=1867077&r2=1867078&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/pdata.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/pdata.py Tue Sep 17 21:28:37 2019
@@ -127,9 +127,9 @@ def getJIRAProjects(project, tlpid):
             x = readJson(RAOHOME+"data/JIRA/jira_projects.json")
         else:
             if sys.version_info >= (3, 0):
-                base64string = base64.encodestring(('%s:%s' % ('githubbot', jirapass)).encode('ascii')).decode('ascii')[:-1]
+                base64string = base64.encodebytes(('%s:%s' % ('githubbot', jirapass)).encode('ascii')).decode('ascii')[:-1]
             else:
-                base64string = base64.encodestring('%s:%s' % ('githubbot', jirapass))[:-1]
+                base64string = base64.encodebytes('%s:%s' % ('githubbot', jirapass))[:-1]
     
             try:
                 x = requests.get("https://issues.apache.org/jira/rest/api/2/project.json",
headers = {"Authorization": "Basic %s" % base64string}).json()
@@ -176,9 +176,9 @@ def getJIRAS(project):
         pass
     if refresh:
         if sys.version_info >= (3, 0):
-            base64string = base64.encodestring(('%s:%s' % ('githubbot', jirapass)).encode('ascii')).decode('ascii')[:-1]
+            base64string = base64.encodebytes(('%s:%s' % ('githubbot', jirapass)).encode('ascii')).decode('ascii')[:-1]
         else:
-            base64string = base64.encodestring('%s:%s' % ('githubbot', jirapass))[:-1]
+            base64string = base64.encodebytes('%s:%s' % ('githubbot', jirapass))[:-1]
         try:
             headers = {"Authorization": "Basic %s" % base64string}
             req = requests.get("""https://issues.apache.org/jira/rest/api/2/search?jql=project%20=%20'"""
+ project + """'%20AND%20created%20%3E=%20-91d""", headers = headers)



Mime
View raw message