зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1660288 - fix python3 errors in the linter's hooks.py tripped when using python3-based mercurial, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D87800
This commit is contained in:
Родитель
77b6aa4aa6
Коммит
11288fd257
|
@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
|
import six
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from distutils.spawn import find_executable
|
from distutils.spawn import find_executable
|
||||||
|
@ -26,6 +27,8 @@ def run_process(cmd):
|
||||||
|
|
||||||
|
|
||||||
def run_mozlint(hooktype, args):
|
def run_mozlint(hooktype, args):
|
||||||
|
if isinstance(hooktype, six.binary_type):
|
||||||
|
hooktype = hooktype.decode('UTF-8', 'replace')
|
||||||
# --quiet prevents warnings on eslint, it will be ignored by other linters
|
# --quiet prevents warnings on eslint, it will be ignored by other linters
|
||||||
python = find_executable("python3")
|
python = find_executable("python3")
|
||||||
if not python:
|
if not python:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче