Fix an UnboundLocalError if a compiler fails.
Depending on where an exception is raised inside a compiler's `execute_command`, the `stdout` variable may not be assigned. In this case, the finally handler would fail with an `UnboundLocalError`, hiding the true cause of the exception. This change adds a new variable, `stdout_name`, which is populated once we've actually created the file. After this, the `CompilerError` is successfully raised with the contents of the true error.
Showing
Please
register
or
sign in
to comment