Chromium Code Reviews| Index: scripts/slave/extract_build.py |
| diff --git a/scripts/slave/extract_build.py b/scripts/slave/extract_build.py |
| index f08fba727d374df40ece3e539995cdb16a0caf88..c48911ab2d4aa473ed5c82bdef148a3d9aa02a0a 100755 |
| --- a/scripts/slave/extract_build.py |
| +++ b/scripts/slave/extract_build.py |
| @@ -77,7 +77,7 @@ def GetBuildUrl(abs_build_dir, options): |
| replace_dict = dict(options.build_properties) |
| # If builddir isn't specified, assume buildbot used the builder name |
| # as the root folder for the build. |
| - if not replace_dict.get('parent_builddir'): |
| + if not replace_dict.get('parent_builddir') and replace_dict.get('parentname'): |
|
kjellander_chromium
2012/12/28 16:47:31
This avoids crashing if an empty build_properties
Isaac (away)
2013/01/08 08:54:02
Still might crash because replace_dict wouldn't ha
kjellander_chromium
2013/01/08 09:32:52
Good idea. Updated.
On 2013/01/08 08:54:02, Isaac
|
| replace_dict['parent_builddir'] = replace_dict['parentname'] |
| replace_dict['base_filename'] = base_filename |
| url = options.build_url or options.factory_properties.get('build_url') |
| @@ -85,7 +85,9 @@ def GetBuildUrl(abs_build_dir, options): |
| url = ('http://%(parentslavename)s/b/build/slave/%(parent_builddir)s/' |
| 'chrome_staging') |
| if url[-4:] != '.zip': # assume filename not specified |
| - url = os.path.join(url, '%(base_filename)s.zip') |
| + # Append the filename to the base URL. First strip any trailing slashes. |
|
kjellander_chromium
2012/12/28 16:47:31
Simple way of avoiding double slashes being concat
|
| + url = url.strip('/') |
|
Isaac (away)
2013/01/08 08:54:02
nit, cleaner to use rstrip
kjellander_chromium
2013/01/08 09:32:52
Done.
|
| + url = '%s/%s' % (url, '%(base_filename)s.zip') |
| url = url % replace_dict |
| versioned_url = url.replace('.zip', version_suffix + '.zip') |