Repository: aurora
Updated Branches:
  refs/heads/master 1c7343831 -> 5183fe0d5


Improve review_feedback.py testability.

Reviewed at https://reviews.apache.org/r/41565/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/5183fe0d
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/5183fe0d
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/5183fe0d

Branch: refs/heads/master
Commit: 5183fe0d5d94357bb1b602f6a8a28cc869b9c7e5
Parents: 1c73438
Author: John Sirois <[email protected]>
Authored: Fri Dec 18 12:19:31 2015 -0800
Committer: Bill Farner <[email protected]>
Committed: Fri Dec 18 12:20:03 2015 -0800

----------------------------------------------------------------------
 build-support/jenkins/review_feedback.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/5183fe0d/build-support/jenkins/review_feedback.py
----------------------------------------------------------------------
diff --git a/build-support/jenkins/review_feedback.py 
b/build-support/jenkins/review_feedback.py
index fcf574a..ee37742 100755
--- a/build-support/jenkins/review_feedback.py
+++ b/build-support/jenkins/review_feedback.py
@@ -27,12 +27,12 @@ import urllib2
 
 class ReviewBoard(object):
   def __init__(self, host, user, password):
-    self._host = host
+    self._base_url = 'https://%s' % host if not host.startswith('http') else 
host
     self.user = user
     self._password = password
 
   def api_url(self, api_path):
-    return 'https://%s/api/%s/' % (self._host, api_path)
+    return '%s/api/%s/' % (self._base_url, api_path)
 
   def get_resource_data(self, href, args=None, accept='application/json', 
data=None):
     href = '%s?%s' % (href, urllib.urlencode(args)) if args else href
@@ -135,12 +135,12 @@ def main():
       '--tail-lines',
       type=int,
       default=20,
-      help='Number of lines of command output to include in red build 
reviews.',
-      required=True)
+      help='Number of lines of command output to include in red build 
reviews.')
   parser.add_argument(
     '--git-clean-exclude',
     help='Patterns to pass to git-clean --exclude.',
-    nargs='*')
+    nargs='*',
+    default=[])
   args = parser.parse_args()
 
   credentials = args.reviewboard_credentials_file.readlines()

Reply via email to