|
|
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. |
Descriptiongn.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 #Messages
Total messages: 18 (11 generated)
eseidel@chromium.org changed reviewers: + szager@google.com
szager@chromium.org changed reviewers: + szager@chromium.org
That gclient code is terrible; who wrote that? This patch is fine, but FTR, since there are so many path-y functions that sometimes return None, it's good practice to check 'if path is None:' rather than 'if path:'. lgtm
The CQ bit was checked by eseidel@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from szager@chromium.org Link to the patchset: https://codereview.chromium.org/985903002/#ps20001 (title: "Check is None explicitly")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985903002/20001
The CQ bit was checked by eseidel@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from szager@chromium.org Link to the patchset: https://codereview.chromium.org/985903002/#ps40001 (title: "Remove cmp from watchlist")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985903002/40001
The CQ bit was unchecked by commit-bot@chromium.org
The CQ bit was checked by eseidel@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985903002/40001
The CQ bit was unchecked by commit-bot@chromium.org
Presubmit check for 985903002-40001 failed and returned exit status 1. Running presubmit commit checks ... Checking out rietveld... Running save-description-on-failure.sh Running push-basic.sh Running upstream.sh Running submit-from-new-dir.sh Running abandon.sh Running submodule-merge-test.sh Running upload-local-tracking-branch.sh Running hooks.sh Running post-dcommit-hook-test.sh Running upload-stale.sh Running patch.sh Running basic.sh ** Presubmit ERRORS ** Pylint (114 files) (205.94s) failed No config file found, using default configuration ************* Module PRESUBMIT W: 46, 0: TODO(maruel): Make sure at least one file is modified first. (fixme) W: 47, 0: TODO(maruel): If only tests are modified, only run them. (fixme) W: 16, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 17, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 18, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 26, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 27, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 28, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 29, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 31, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 32, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 33, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 34, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 36, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) C: 37, 0: Wrong hanging indentation. 'R0401', # Cyclic import ^ | (bad-continuation) C: 38, 0: Wrong hanging indentation. 'W0613', # Unused argument ^ | (bad-continuation) W: 40, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 48, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 54, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 55, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 56, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 57, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 58, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) C: 58, 0: Unnecessary parens after 'print' keyword (superfluous-parens) W: 59, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 60, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 64, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 66, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 68, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 71, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 72, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 73, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 74, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 75, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 76, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 77, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 78, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 80, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 81, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 83, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 84, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 86, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 89, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 91, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 92, 0: Bad indentation. Found 8 spaces, expected 16 (bad-indentation) W: 94, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) C: 94, 0: Unnecessary parens after 'print' keyword (superfluous-parens) W: 95, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 96, 0: Bad indentation. Found 8 spaces, expected 16 (bad-indentation) W: 97, 0: Bad indentation. Found 10 spaces, expected 20 (bad-indentation) W: 99, 0: Bad indentation. Found 8 spaces, expected 16 (bad-indentation) W:100, 0: Bad indentation. Found 10 spaces, expected 20 (bad-indentation) W:103, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W:104, 0: Bad indentation. Found 8 spaces, expected 16 (bad-indentation) W:105, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:106, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W:107, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:108, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W:109, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:114, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) C:119, 0: Wrong hanging indentation. ] | ^ | (bad-continuation) W:120, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:124, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:125, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:126, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:129, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W:130, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) C: 15, 0: Invalid function name "CommonChecks" (invalid-name) C: 15, 0: Missing function docstring (missing-docstring) C: 27,31: Invalid variable name "fh" (invalid-name) C: 32,38: Invalid variable name "fh" (invalid-name) C: 63, 0: Invalid function name "RunGitClTests" (invalid-name) C: 89, 6: Invalid variable name "DISABLED_TESTS" (invalid-name) C:103,65: Invalid variable name "e" (invalid-name) C:105,33: Invalid variable name "e" (invalid-name) C:112, 0: Invalid function name "CheckChangeOnUpload" (invalid-name) C:112, 0: Missing function docstring (missing-docstring) C:123, 0: Invalid function name "CheckChangeOnCommit" (invalid-name) C:123, 0: Missing function docstring (missing-docstring) ************* Module annotated_gclient W: 26, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 27, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 29, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 31, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 32, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 33, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 34, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 38, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 39, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 40, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 42, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 44, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 45, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 46, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 47, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 49, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 53, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 54, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 58, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 61, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 63, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 65, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 67, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 69, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 70, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 72, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 73, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 75, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 76, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 77, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 78, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 79, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 80, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 82, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 83, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 84, 0: Bad indentation. Found 6 spaces, expected 12 (bad-indentation) W: 85, 0: Bad indentation. Found 4 spaces, expected 8 (bad-indentation) W: 89, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) C: 25, 0: Missing function docstring (missing-docstring) C: 33,20: Invalid variable name "e" (invalid-name) C: 37, 0: Missing function docstring (missing-docstring) C: 39,25: Invalid variable name "f" (invalid-name) C: 52, 0: Missing function docstring (missing-docstring) C: 57, 0: Missing function docstring (missing-docstring) C: 75,37: Invalid variable name "f" (invalid-name) C: 79, 4: Invalid variable name "p" (invalid-name) ************* Module apply_issue I: 18, 0: Locally disabling unused-import (W0611) (locally-disabled) I:149, 0: Locally disabling bad-except-order (E0701) (locally-disabled) W: 44, 0: TODO(pgervais): This function is way too long. Split. (fixme) W:157, 0: TODO(maruel): A few 'Invalid username or password.' are printed first, (fixme) W:213, 0: TODO(maruel): HACK, remove me. (fixme) W: 31, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 32, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) W: 33, 0: Bad indentation. Found 4 spaces, expected 8… (message too large)
Bah. I think I'm going to abandon this patch.
Description was changed from ========== 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. ========== to ========== 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. ==========
szager@chromium.org changed reviewers: - szager@chromium.org, szager@google.com |