Commit c432a7f7 authored by tfarina@chromium.org's avatar tfarina@chromium.org

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
parent 013731e8
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment