From c432a7f7b3530cde3cdc8556969ed8c734b9077d Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Sat, 28 Feb 2015 19:20:22 +0000 Subject: [PATCH] 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 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 --- clang_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang_format.py b/clang_format.py index f69f94d6e..5bfeb1ae9 100755 --- a/clang_format.py +++ b/clang_format.py @@ -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)