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

Side by Side Diff: build/log_tools.py

Issue 12450015: **/*.py: use /usr/bin/env to find python Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Created 7 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
« no previous file with comments | « build/local_storage_cache_test.py ('k') | build/prep_nacl_sdk.py » ('j') | 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/python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client 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 """Logging related tools.""" 6 """Logging related tools."""
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import subprocess 10 import subprocess
11 import sys 11 import sys
(...skipping 16 matching lines...) Expand all
28 if logging.getLogger().getEffectiveLevel() <= logging.DEBUG: 28 if logging.getLogger().getEffectiveLevel() <= logging.DEBUG:
29 subprocess.check_call(command, **kwargs) 29 subprocess.check_call(command, **kwargs)
30 else: 30 else:
31 p = subprocess.Popen( 31 p = subprocess.Popen(
32 command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs) 32 command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
33 p_stdout, p_stderr = p.communicate() 33 p_stdout, p_stderr = p.communicate()
34 if p.wait() != 0: 34 if p.wait() != 0:
35 sys.stdout.write(p_stdout) 35 sys.stdout.write(p_stdout)
36 sys.stderr.write(p_stderr) 36 sys.stderr.write(p_stderr)
37 raise subprocess.CalledProcessError(cmd=command, returncode=p.returncode) 37 raise subprocess.CalledProcessError(cmd=command, returncode=p.returncode)
OLDNEW
« no previous file with comments | « build/local_storage_cache_test.py ('k') | build/prep_nacl_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698