From 3ae11e860ca900ecbda19c6c5eb36e832e9ef2f9 Mon Sep 17 00:00:00 2001 From: e0d Date: Tue, 11 Jun 2013 15:00:39 -0400 Subject: [PATCH] Better error handling. (cherry picked from commit 1511ec841a30a7a8adbec2d700502a1e685f6103) --- lms/envs/aws_migrate.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lms/envs/aws_migrate.py b/lms/envs/aws_migrate.py index 6ba81f04e0..fae928868e 100644 --- a/lms/envs/aws_migrate.py +++ b/lms/envs/aws_migrate.py @@ -4,5 +4,9 @@ import os USER = os.environ.get('DB_MIGRATION_USER', 'root') PASSWORD = os.environ.get('DB_MIGRATION_PASS', None) +if not PASSWORD: + raise ImproperlyConfigured("No database password was provided for running " + "migrations. This is fatal.") + DATABASES['default']['USER'] = USER DATABASES['default']['PASSWORD'] = PASSWORD