Browse Source

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
Ben Nemec 1 year ago
parent
commit
ca3c45044b
2 changed files with 3 additions and 2 deletions
  1. 2
    2
      oslo_concurrency/processutils.py
  2. 1
    0
      tox.ini

+ 2
- 2
oslo_concurrency/processutils.py View File

@@ -575,9 +575,9 @@ def ssh_execute(ssh, cmd, process_input=None,
575 575
             # to decode it, or an Unicode string otherwise. Encode to the
576 576
             # default encoding (ASCII) because mask_password() decodes from
577 577
             # the same encoding.
578
-            if isinstance(stdout, unicode):
578
+            if isinstance(stdout, six.text_type):
579 579
                 stdout = stdout.encode()
580
-            if isinstance(stderr, unicode):
580
+            if isinstance(stderr, six.text_type):
581 581
                 stderr = stderr.encode()
582 582
         else:
583 583
             # fsencode() is the reverse operation of fsdecode()

+ 1
- 0
tox.ini View File

@@ -14,6 +14,7 @@ commands =
14 14
     env TEST_EVENTLET=1 lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}'
15 15
 
16 16
 [testenv:pep8]
17
+basepython = python3
17 18
 deps =
18 19
   -r{toxinidir}/test-requirements.txt
19 20
 commands =

Loading…
Cancel
Save