Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: tools/bots/bot_utils.py

Issue 189823004: Fix error where we are looking the gsutil script in the wrong location. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bots/bot_utils.py
===================================================================
--- tools/bots/bot_utils.py (revision 33421)
+++ tools/bots/bot_utils.py (working copy)
@@ -220,14 +220,21 @@
GSUtil.GSUTIL_PATH = buildbot_gsutil
else:
dart_gsutil = os.path.join(DART_DIR, 'third_party', 'gsutil', 'gsutil')
- possible_locations = (list(os.environ['PATH'].split(os.pathsep))
- + [dart_gsutil])
- for directory in possible_locations:
- location = os.path.join(directory, 'gsutil')
- if os.path.isfile(location):
- GSUtil.GSUTIL_IS_SHELL_SCRIPT = False
- GSUtil.GSUTIL_PATH = location
- break
+ if os.path.isfile(dart_gsutil):
+ GSUtil.GSUTIL_IS_SHELL_SCRIPT = False
+ GSUtil.GSUTIL_PATH = dart_gsutil
+ elif GSUtil.USE_DART_REPO_VERSION:
+ raise Exception("Requiring to use dart repo version of gsutil,"
Bill Hesse 2014/03/07 12:19:53 Dart repository version of gsutil required, but no
ricow1 2014/03/07 12:30:15 Done.
+ " but not found.")
+ else:
+ # We did not find gsutil, look in path
+ possible_locations = list(os.environ['PATH'].split(os.pathsep))
+ for directory in possible_locations:
+ location = os.path.join(directory, 'gsutil')
+ if os.path.isfile(location):
+ GSUtil.GSUTIL_IS_SHELL_SCRIPT = False
+ GSUtil.GSUTIL_PATH = location
+ break
assert GSUtil.GSUTIL_PATH
def execute(self, gsutil_args):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698