Skip to content

Commit e447417

Browse files
authored
Fix cpplint.py to work under Python 3 (#6201)
1 parent a22b425 commit e447417

File tree

2 files changed

+865
-201
lines changed

2 files changed

+865
-201
lines changed

scripts/check_lint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import logging
2424
import os
2525
import subprocess
26+
import sys
2627
import textwrap
2728

2829
from lib import checker
@@ -124,7 +125,7 @@ def _run_cpplint(options, files):
124125
scripts_dir = os.path.dirname(os.path.abspath(__file__))
125126
cpplint = os.path.join(scripts_dir, 'cpplint.py')
126127

127-
command = ['python2', cpplint, '--quiet']
128+
command = [sys.executable, cpplint, '--quiet']
128129
command.extend(options)
129130
command.extend(files)
130131

0 commit comments

Comments
 (0)