Maybe I am a little tired, but I do not see why it must be inside the try/exception (unless you want to prevent this import if there is not a SintaxError).