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

Issue 985903002: gn.py dies with exception when it can't find buildtools/

Created:
5 years, 9 months ago by eseidel
Modified:
4 years, 6 months ago
Reviewers:
szager1
CC:
chromium-reviews, cmp-cc_chromium.org, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Project:
tools
Visibility:
Public.

Description

gn.py dies with exception when it can't find buildtools/ Traceback (most recent call last): File "/src/depot_tools/gn.py", line 38, in <module> sys.exit(main(sys.argv)) File "/src/depot_tools/gn.py", line 22, in main bin_path = gclient_utils.GetBuildtoolsPlatformBinaryPath() File "/src/depot_tools/gclient_utils.py", line 714, in GetBuildtoolsPlatformBinaryPath buildtools_path = GetBuildtoolsPath() File "/src/depot_tools/gclient_utils.py", line 702, in GetBuildtoolsPath buildtools_path = os.path.join(primary_solution, 'buildtools') File "/usr/lib/python2.7/posixpath.py", line 77, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith' This patch fixes it to display a better error. It already had error handling, but the exception was preventing it from getting that far. I also cleaned up the error message to indicate more clearly that it was buildtools/ that it's looking for.

Patch Set 1 #

Patch Set 2 : Check is None explicitly #

Patch Set 3 : Remove cmp from watchlist #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M WATCHLISTS View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M gclient_utils.py View 1 1 chunk +2 lines, -0 lines 0 comments Download
M gn.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (11 generated)
eseidel
5 years, 9 months ago (2015-03-07 00:18:26 UTC) #2
szager1
That gclient code is terrible; who wrote that? This patch is fine, but FTR, since ...
5 years, 9 months ago (2015-03-07 00:28:55 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985903002/20001
5 years, 9 months ago (2015-03-07 00:34:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985903002/40001
5 years, 9 months ago (2015-03-07 00:40:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985903002/40001
5 years, 9 months ago (2015-03-07 01:00:26 UTC) #13
commit-bot: I haz the power
Presubmit check for 985903002-40001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 9 months ago (2015-03-07 01:06:00 UTC) #15
eseidel
5 years, 6 months ago (2015-06-08 17:36:21 UTC) #16
Bah.  I think I'm going to abandon this patch.

Powered by Google App Engine
This is Rietveld 408576698