Switch pep8 job to python 3
pep8 under python 3 is more strict than under python 2, so to make sure our projects meet the more strict standards we want to run the pep8 jobs using python 3 by default. Change-Id: Ice3cffa36e9167f2f1f30337372cf9187af5e02e
This commit is contained in:
parent
e55a18c5e0
commit
ca3c45044b
@ -575,9 +575,9 @@ def ssh_execute(ssh, cmd, process_input=None,
|
|||||||
# to decode it, or an Unicode string otherwise. Encode to the
|
# to decode it, or an Unicode string otherwise. Encode to the
|
||||||
# default encoding (ASCII) because mask_password() decodes from
|
# default encoding (ASCII) because mask_password() decodes from
|
||||||
# the same encoding.
|
# the same encoding.
|
||||||
if isinstance(stdout, unicode):
|
if isinstance(stdout, six.text_type):
|
||||||
stdout = stdout.encode()
|
stdout = stdout.encode()
|
||||||
if isinstance(stderr, unicode):
|
if isinstance(stderr, six.text_type):
|
||||||
stderr = stderr.encode()
|
stderr = stderr.encode()
|
||||||
else:
|
else:
|
||||||
# fsencode() is the reverse operation of fsdecode()
|
# fsencode() is the reverse operation of fsdecode()
|
||||||
|
1
tox.ini
1
tox.ini
@ -14,6 +14,7 @@ commands =
|
|||||||
env TEST_EVENTLET=1 lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}'
|
env TEST_EVENTLET=1 lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
basepython = python3
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
|
Loading…
Reference in New Issue
Block a user