Fix building static media on Django 1.11.
Review Request #10605 — Created June 21, 2019 and submitted
Our wrapper script for building static media attempted to honor the
exit code of thecollectstatic
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 explicitsys.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 tosys.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.
Summary | ID |
---|---|
a17061bffdcc98b7a0b4be0c68ddfdf42dc04d89 |