Fixed build error handling using invalid Python syntax.