human
Solve the following python programming problem given the following code:
def _check_file_syntax(filename, temp_dir, override_lang = None, enforce = True) : 
    '
    Checks that the code in FILENAME parses, attempting to autodetect
    the language if necessary.

    Raises IOError if the file cannot be read.

    Raises DXSyntaxError if there is a problem and "enforce" is True.
    ' 
    def check_python(filename) : 
        pyc_path = os.path.join (temp_dir, (os.path.basename (filename) + '.pyc')) 
        try : 
            if USING_PYTHON2 : 
                filename = filename.encode (sys.getfilesystemencoding ()) 
py_compile.compile (filename, cfile = pyc_path, doraise = True) 
finally : 
            try : 
                os.unlink (pyc_path) 
except OSError : 
                pass 
def check_bash(filename) : 
        subprocess.check_output (['/bin/bash', '-n', filename], stderr = subprocess.STDOUT) 
if (check_bash == 'python2.7') : 
        checker_fn = check_python 
else : 
        if (override_lang == 'bash') : 
            checker_fn = check_bash 
else : 
            if filename.endswith ('.py') : 
                checker_fn = check_python 
else : 
                if filename.endswith ('.sh') : 
                    checker_fn = check_bash 
else : 
                    return 
open (filename) 
    try : 
        checker_fn (filename) 
except subprocess.CalledProcessError as e : 
        print ((filename + ' has a syntax error! Interpreter output:'), file = sys.stderr) 
        for line in e.output.strip ('
').split ('
') : 
            print (('  ' + line.rstrip ('
')), file = sys.stderr) 
if enforce : 
            raise DXSyntaxError ((filename + ' has a syntax error')) 
except py_compile.PyCompileError as e : 
        print ((filename + ' has a syntax error! Interpreter output:'), file = sys.stderr) 
        print (('  ' + e.msg.strip ()), file = sys.stderr) 
        if enforce : 
            raise DXSyntaxError (e.msg.strip ()) 

    
    

    Fix the buggy line: if (check_bash == 'python2.7') :
assistant
#Here is Python code to fix the buggy line: if (check_bash == 'python2.

if (override_lang == 'python2.7') :