# # # # # # # # # # # # # #
# CAPTAINHOOK IDENTIFIER  #
# # # # # # # # # # # # # #
from .utils import bash, python_files_for_commit

DEFAULT = 'on'


def run():
    "Check to see if python files are py3 compatible"
    errors = []
    for py_file in python_files_for_commit():
        b = bash('python3 -m py_compile {0}'.format(py_file))
        if b.err:
            errors.append(b.err.decode(encoding='UTF-8'))
    return "\n".join(errors)

@@ -293,32 +293,18 @@
 sh('
-python3 -m py_compile %7B0
+2to3 %7Bfile
 %7D'.f
@@ -309,16 +309,21 @@
 .format(
+file=
 py_file)
@@ -328,30 +328,8 @@
 e))%0A
-        if b.err:%0A    
     
@@ -348,19 +348,22 @@
 ppend(b.
-err
+output
 .decode(

Replace python3 compile action with 2to3 action