Ensure DJANGO_SETTINGS_MODULE in set when running rbssh.
Review Request #7457 — Created June 25, 2015 and submitted — Latest diff uploaded
If rbssh was invoked manually,
DJANGO_SETTINGS_MODULE
likely wouldn't be
set, and it would fail with an error. This could in theory also happen
if the environment isn't propagated from within Review Board down
through whatever process ended up invoking rbssh.We now ensure we have this variable set, so that our code is guaranteed
to be able to access settings.
Ran
rbssh localhost
in a standard shell, and successfully logged into
a new SSH session. Previously, it would error out with a complaint about
settings.