0
Commit Graph

3 Commits

Author SHA1 Message Date
Dirk Pranke
4d164bb063 Update '#!/usr/bin/python' shebangs to '#!/usr/bin/env python'.
Python2 has been considered obsolete since 2020-01-01. Some Linux
distributions are increasingly moving away from installing a
Python2 binary in `/usr/bin/python`, which means that any
Unix shebang lines that refer to it will stop working.

This CL changes (almost) all of the shebang lines found in
chromium/src to use `#!/usr/bin/env python` instead, which is
more portable (it allows you to have your own Python as long as
it is simply somewhere in $PATH). There are a few cases where
I did not update the changes because they were in third_party
code.

The actual command used to generate this CL was:

git grep -l '^#!\s*/usr/bin/python$' -- \*.py | egrep -v 'external/wpt|third_party/(abseil-cpp|android_platform|libxml|closure_compiler|google_input_tools|libxml|mako|opus|protobuf|wpt_tools|zxcvbn-cpp)' | xargs perl -pi -e 's-^#!/usr/bin/python-#!/usr/bin/env python-'

Bug: 1191100
Change-Id: Ifca134a1e24d56b25114c6f70a173d71fec8e6d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2780719
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Owners-Override: Kentaro Hara <haraken@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#866002}
2021-03-24 06:52:40 +00:00
Raul Tambre
26d7db41b1 tools: Use Python 3 style print statements [5/9]
Initial conversion performed using '2to3 -f print .'.
Imports added and duplicate parentheses removed manually.
Manually converted files, comments and inline code that 2to3 missed.
Afterwards ran "git cl format --python" and cherry-picked the formatting changes.

There are no intended behavioural changes.

Bug: 941669
Change-Id: I6aece261941a1a10fbc329bc4ac1012a9a06ebd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1818518
Commit-Queue: Raul Tambre <raul@tambre.ee>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699699}
2019-09-25 11:06:35 +00:00
jknotten@chromium.org
7d58329349 Upstream IPC message resolver tool.
This is a tool to process log files and resolve IPC messages to
symbols.

Processes a log file and translates message identifiers of the form
[unknown type NNNNNN] to IPC messages.  python
tools/ipc_messages_log.py logcat.txt.

e.g. logfile containing

ipc 3915.3.1370207904 2147483647 S [unknown type 66372]

will be transformed to:

ipc 3915.3.1370207904 2147483647 S ViewMsg_SetCSSColors

BUG=None
TEST=None


Review URL: https://chromiumcodereview.appspot.com/10543162

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142681 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-18 08:27:13 +00:00