Ensure DJANGO_SETTINGS_MODULE in set when running rbssh.
Review Request #7457 — Created June 25, 2015 and submitted
If rbssh was invoked manually,
DJANGO_SETTINGS_MODULElikely 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 localhostin a standard shell, and successfully logged into
a new SSH session. Previously, it would error out with a complaint about
settings.
Tool: Pyflakes Processed Files: reviewboard/cmdline/rbssh.py Tool: PEP8 Style Checker Processed Files: reviewboard/cmdline/rbssh.py