Skip to content
Snippets Groups Projects
Commit e1f4d80c authored by Valentin Rigal's avatar Valentin Rigal
Browse files

Merge branch 'handle-empty-args' into 'master'

Prevent an IndexError when running manage.py without arguments

See merge request !1428
parents a634ec14 e4c9d60f
No related branches found
No related tags found
1 merge request!1428Prevent an IndexError when running manage.py without arguments
......@@ -28,7 +28,7 @@ BASE_DIR = Path(_base_dir) if _base_dir else Path(__file__).resolve().parent.par
TEST_ENV = 'test' in sys.argv
# Matches ./manage.py shell[_plus] and arkindex shell[_plus] to disable Sentry reporting
DJANGO_SHELL = sys.argv[1] in ('shell', 'shell_plus')
DJANGO_SHELL = len(sys.argv) > 1 and sys.argv[1] in ('shell', 'shell_plus')
CONFIG_PATH = Path(os.environ.get('CONFIG_PATH', BASE_DIR / 'config.yml'))
parser = get_settings_parser(BASE_DIR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment