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

Side by Side Diff: clang_format.py

Issue 972453002: Fix the argument passed to main() in clang_format.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Redirects to the version of clang-format checked into the Chrome tree. 6 """Redirects to the version of clang-format checked into the Chrome tree.
7 7
8 clang-format binaries are pulled down from Google Cloud Storage whenever you 8 clang-format binaries are pulled down from Google Cloud Storage whenever you
9 sync Chrome, to platform-specific locations. This script knows how to locate 9 sync Chrome, to platform-specific locations. This script knows how to locate
10 those tools, assuming the script is invoked from inside a Chromium checkout.""" 10 those tools, assuming the script is invoked from inside a Chromium checkout."""
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 # redirection can be a little opaque. 60 # redirection can be a little opaque.
61 help_syntax = ('-h', '--help', '-help', '-help-list', '--help-list') 61 help_syntax = ('-h', '--help', '-help', '-help-list', '--help-list')
62 if any(match in args for match in help_syntax): 62 if any(match in args for match in help_syntax):
63 print '\nDepot tools redirects you to the clang-format at:\n %s\n' % tool 63 print '\nDepot tools redirects you to the clang-format at:\n %s\n' % tool
64 64
65 return subprocess.call([tool] + args) 65 return subprocess.call([tool] + args)
66 66
67 67
68 if __name__ == '__main__': 68 if __name__ == '__main__':
69 try: 69 try:
70 sys.exit(main(sys.argv[1])) 70 sys.exit(main(sys.argv[1:]))
71 except KeyboardInterrupt: 71 except KeyboardInterrupt:
72 sys.stderr.write('interrupted\n') 72 sys.stderr.write('interrupted\n')
73 sys.exit(1) 73 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698