| Index: my_activity.py
|
| diff --git a/my_activity.py b/my_activity.py
|
| index 3d73c8b1c3908853d714b14754f412203eb43ddd..ca5738d6f9759e76cd677995c4eaa24cfd84237b 100755
|
| --- a/my_activity.py
|
| +++ b/my_activity.py
|
| @@ -35,6 +35,7 @@ import sys
|
| import urllib
|
| import urllib2
|
|
|
| +import gerrit_util
|
| import rietveld
|
| from third_party import upload
|
|
|
| @@ -119,12 +120,10 @@ gerrit_instances = [
|
| 'url': 'chromium-review.googlesource.com',
|
| 'shorturl': 'crosreview.com',
|
| },
|
| - # TODO(deymo): chrome-internal-review requires login credentials. Enable once
|
| - # login support is added to this client. See crbug.com/281695.
|
| - #{
|
| - # 'url': 'chrome-internal-review.googlesource.com',
|
| - # 'shorturl': 'crosreview.com/i',
|
| - #},
|
| + {
|
| + 'url': 'chrome-internal-review.googlesource.com',
|
| + 'shorturl': 'crosreview.com/i',
|
| + },
|
| {
|
| 'host': 'gerrit.chromium.org',
|
| 'port': 29418,
|
| @@ -411,14 +410,13 @@ class MyActivity(object):
|
| ('q', ' '.join(filters)),
|
| ('o', 'MESSAGES'),
|
| ('o', 'LABELS')])
|
| - rest_url = 'https://%s/changes/?%s' % (instance['url'], args)
|
| + conn = gerrit_util.CreateHttpConn(instance['url'], 'changes/?%s' % args)
|
|
|
| - req = urllib2.Request(rest_url, headers={'Accept': 'text/plain'})
|
| try:
|
| - response = urllib2.urlopen(req)
|
| + response = gerrit_util.ReadHttpResponse(conn, ignore_404=False)
|
| stdout = response.read()
|
| - except urllib2.HTTPError, e:
|
| - print 'ERROR: Looking up %r: %s' % (rest_url, e)
|
| + except gerrit_util.GerritError, e:
|
| + print 'ERROR: Looking up %r: %s' % (instance['url'], e)
|
| return []
|
|
|
| # Check that the returned JSON starts with the right marker.
|
|
|