Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # coding=utf8 | 2 # coding=utf8 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 """Runs presubmit check on the source tree. | 6 """Runs presubmit check on the source tree. |
| 7 | 7 |
| 8 This shims removes the checks for try jobs. | 8 This shims removes the checks for try jobs. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import os | 11 import os |
| 12 import sys | 12 import sys |
| 13 | 13 |
| 14 ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) | 14 ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 15 sys.path.insert(0, os.path.dirname(ROOT_DIR)) | 15 sys.path.insert(0, os.path.dirname(ROOT_DIR)) |
| 16 | 16 |
| 17 import find_depot_tools # pylint: disable=W0611 | 17 import find_depot_tools # pylint: disable=W0611,F0401 |
| 18 import presubmit_support | 18 import presubmit_support # pylint: disable=F0401 |
|
Paweł Hajdan Jr.
2014/01/02 12:25:30
I don't remember hitting pylint errors on importin
| |
| 19 | 19 |
| 20 # Do not pass them through the command line. | 20 # Do not pass them through the command line. |
| 21 email = sys.stdin.readline().strip() | 21 email = sys.stdin.readline().strip() |
| 22 assert email | 22 assert email |
| 23 password = sys.stdin.readline().strip() | 23 password = sys.stdin.readline().strip() |
| 24 assert password | |
| 25 sys.stdin.close() | 24 sys.stdin.close() |
| 26 | 25 |
| 27 argv = sys.argv[1:] | 26 argv = sys.argv[1:] |
| 28 argv.extend(['--rietveld_email', email, '--rietveld_password', password]) | 27 argv.extend(['--rietveld_email', email, '--rietveld_password', password]) |
| 29 argv.extend(['--skip_canned', 'CheckRietveldTryJobExecution']) | 28 argv.extend(['--skip_canned', 'CheckRietveldTryJobExecution']) |
| 30 argv.extend(['--skip_canned', 'CheckTreeIsOpen']) | 29 argv.extend(['--skip_canned', 'CheckTreeIsOpen']) |
| 31 argv.extend(['--skip_canned', 'CheckBuildbotPendingBuilds']) | 30 argv.extend(['--skip_canned', 'CheckBuildbotPendingBuilds']) |
| 32 | 31 |
| 33 sys.exit(presubmit_support.Main(argv)) | 32 sys.exit(presubmit_support.Main(argv)) |
| OLD | NEW |