Index: tools/submit_try |
diff --git a/tools/submit_try b/tools/submit_try |
index 840a06487f7c74b117a6fa2a7f79069e48e8d200..1c42127e1a641de233147013a4110ccd2f67f0f5 100755 |
--- a/tools/submit_try |
+++ b/tools/submit_try |
@@ -42,10 +42,6 @@ SKIA_BUILD_MASTER_PORT = str(buildbot_globals.Get('public_external_port')) |
# All try builders have this suffix. |
TRYBOT_SUFFIX = '-Trybot' |
-# Location of the codereview.settings file in the Skia repo. |
-SKIA_URL = 'skia.googlecode.com' |
-CODEREVIEW_SETTINGS = '/svn/codereview.settings' |
- |
# String for matching the svn url of the try server inside codereview.settings. |
TRYSERVER_SVN_URL = 'TRYSERVER_SVN_URL: ' |
@@ -92,16 +88,15 @@ def GetCheckoutRoot(is_svn=True): |
def GetTryRepo(): |
- """ Determine the TRYSERVER_SVN_URL from the codereview.settings file in the |
- Skia repo. """ |
- connection = httplib.HTTPConnection(SKIA_URL) |
- connection.request('GET', CODEREVIEW_SETTINGS) |
- content = connection.getresponse().read() |
- for line in content.split('\n'): |
- if line.startswith(TRYSERVER_SVN_URL): |
- return line[len(TRYSERVER_SVN_URL):].rstrip() |
+ """Determine the TRYSERVER_SVN_URL from the codereview.settings file.""" |
+ codereview_settings_file = os.path.join(os.path.dirname(__file__), os.pardir, |
+ 'codereview.settings') |
+ with open(codereview_settings_file) as f: |
+ for line in f: |
+ if line.startswith(TRYSERVER_SVN_URL): |
+ return line[len(TRYSERVER_SVN_URL):].rstrip() |
raise Exception('Couldn\'t determine the TRYSERVER_SVN_URL. Make sure it is ' |
- 'defined in the %s file.' % CODEREVIEW_SETTINGS) |
+ 'defined in the %s file.' % codereview_settings_file) |
def RetrieveTrybotList(json_filename): |