Fix building static media on Django 1.11.
Review Request #10604 — Created June 21, 2019 and submitted
Our wrapper script for building static media attempted to honor the
exit code of the
collectstaticmanagement command, passing it along to
sys.exit()so that we wouldn't have a failure show up as a successful
However, exit codes are never returned. Instead, we were always getting
Noneback, 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
We now just exit normally without trying to be clever and helpful,
letting Django do its own thing.
Built static media on Django 1.11 successfully.