Fix building static media on Django 1.11.

Review Request #10605 — Created June 21, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Our wrapper script for building static media attempted to honor the
exit code of the collectstatic management command, passing it along to
sys.exit() so that we wouldn't have a failure show up as a successful
result.

However, exit codes are never returned. Instead, we were always getting
None back, which Python helpfully converts to an exit code of 0. Any
failure would have been an explicit sys.exit(1) or a raised exception.
So what we were doing was pointless.

On Django 1.11, though, we actually got a result back: The result of
stdout. We were then passing this to sys.exit(), which Python was
converting to an exit code of 1, resulting in the command always
failing.

We now just exit normally without trying to be clever and helpful,
letting Django do its own thing.

Tested building static media on Django 1.6 and 1.11.

Commits

Files

    Loading...