mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Fix the argument passed to main() in clang_format.py
Passing arg[1] rather than argv[1:] is causing the following with Python 2.7.3. Traceback (most recent call last): File "/home/tfarina/depot_tools/clang_format.py", line 70, in <module> sys.exit(main(sys.argv[1])) File "/home/tfarina/depot_tools/clang_format.py", line 65, in main return subprocess.call([tool] + args) TypeError: can only concatenate list (not "str") to list No output from clang-format (crashed?). Please report to bugs.llvm.org. This started to happening after http://src.chromium.org/viewvc/chrome?view=rev&revision=294250 BUG=None TEST=try to format a c++ file using clang-format TBR=sbc@chromium.org,maruel@chromium.org Review URL: https://codereview.chromium.org/972453002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294267 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -67,7 +67,7 @@ def main(args):
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
sys.exit(main(sys.argv[1]))
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
except KeyboardInterrupt:
|
||||
sys.stderr.write('interrupted\n')
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user