Fix building static media on Django 1.11.

Review Request #10604 — Created June 21, 2019 and submitted

chipx86
Djblets
release-2.0.x
djblets

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.

Built static media on Django 1.11 successfully.

Summary
Fix building static media on Django 1.11.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (72902a9)
Loading...