hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [4/4] hadoop git commit: HADOOP-12237. releasedocmaker.py doesn't work behind a proxy (Tsuyoshi Ozawa via aw)
Date Sat, 25 Jul 2015 01:33:23 GMT
HADOOP-12237. releasedocmaker.py doesn't work behind a proxy (Tsuyoshi Ozawa via aw)

(cherry picked from commit b41fe3111ae37478cbace2a07e6ac35a676ef978)
(cherry picked from commit adcf5dd94052481f66deaf402ac4ace1ffc06f49)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/621203bf
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/621203bf
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/621203bf

Branch: refs/heads/branch-2
Commit: 621203bf44886f21e4aa93071ad87b461ecfcc92
Parents: f54862f
Author: Allen Wittenauer <aw@apache.org>
Authored: Mon Jul 20 09:47:46 2015 -0700
Committer: Andrew Wang <wang@apache.org>
Committed: Fri Jul 24 18:32:18 2015 -0700

----------------------------------------------------------------------
 dev-support/releasedocmaker.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/621203bf/dev-support/releasedocmaker.py
----------------------------------------------------------------------
diff --git a/dev-support/releasedocmaker.py b/dev-support/releasedocmaker.py
index 409d8e3..d2e5dda 100755
--- a/dev-support/releasedocmaker.py
+++ b/dev-support/releasedocmaker.py
@@ -24,6 +24,7 @@ import os
 import re
 import sys
 import urllib
+import urllib2
 try:
   import json
 except ImportError:
@@ -125,7 +126,7 @@ class GetVersions:
     versions.sort()
     print "Looking for %s through %s"%(versions[0],versions[-1])
     for p in projects:
-      resp = urllib.urlopen("https://issues.apache.org/jira/rest/api/2/project/%s/versions"%p)
+      resp = urllib2.urlopen("https://issues.apache.org/jira/rest/api/2/project/%s/versions"%p)
       data = json.loads(resp.read())
       for d in data:
         if d['name'][0].isdigit and versions[0] <= d['name'] and d['name'] <= versions[-1]:
@@ -288,7 +289,7 @@ class JiraIter:
     self.projects = projects
     v=str(version).replace("-SNAPSHOT","")
 
-    resp = urllib.urlopen("https://issues.apache.org/jira/rest/api/2/field")
+    resp = urllib2.urlopen("https://issues.apache.org/jira/rest/api/2/field")
     data = json.loads(resp.read())
 
     self.fieldIdMap = {}
@@ -301,7 +302,7 @@ class JiraIter:
     count=100
     while (at < end):
       params = urllib.urlencode({'jql': "project in ('"+"' , '".join(projects)+"') and fixVersion
in ('"+v+"') and resolution = Fixed", 'startAt':at, 'maxResults':count})
-      resp = urllib.urlopen("https://issues.apache.org/jira/rest/api/2/search?%s"%params)
+      resp = urllib2.urlopen("https://issues.apache.org/jira/rest/api/2/search?%s"%params)
       data = json.loads(resp.read())
       if (data.has_key('errorMessages')):
         raise Exception(data['errorMessages'])
@@ -407,6 +408,10 @@ def main():
   if (len(options.versions) <= 0):
     parser.error("At least one version needs to be supplied")
 
+  proxy = urllib2.ProxyHandler()
+  opener = urllib2.build_opener(proxy)
+  urllib2.install_opener(opener)
+
   projects = options.projects
 
   if (options.range is True):


Mime
View raw message