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

Unified Diff: tools/clang/scripts/update.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/checklicenses/checklicenses.py ('k') | tools/code_coverage/coverage.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.py
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
old mode 100644
new mode 100755
index 887b089b1c2059580c77fd935ca0ce3175db4f96..698361929ba3155f2bf0e4ab6ff189c00cc6791a
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -1,18 +1,20 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# Windows can't run .sh files, so this is a small python wrapper around
-# update.sh.
+"""Windows can't run .sh files, so this is a small python wrapper around
+update.sh.
+"""
import os
import subprocess
import sys
-if __name__ == '__main__':
+
+def main():
if sys.platform in ['win32', 'cygwin']:
- sys.exit(0)
+ return 0
# This script is called by gclient. gclient opens its hooks subprocesses with
# (stdout=subprocess.PIPE, stderr=subprocess.STDOUT) and then does custom
@@ -24,6 +26,10 @@ if __name__ == '__main__':
# is writable, try
# fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi')
# TODO: Fix gclient instead, http://crbug.com/95350
- subprocess.call(
+ return subprocess.call(
[os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:],
stderr=sys.stdin)
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « tools/checklicenses/checklicenses.py ('k') | tools/code_coverage/coverage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698