Skip to content

Commit c565cf4

Browse files
saltycraneericholscher
authored andcommitted
Catch all exceptions because connection.cursor() does not raise DatabaseError for me
1 parent 3060249 commit c565cf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test_utils/test_runners/keep_database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
6767
if not os.path.exists(settings.DATABASES['default']['NAME']):
6868
raise DatabaseError
6969
cursor = connection.cursor()
70-
except DatabaseError, e:
70+
except Exception:
7171
# db does not exist
7272
# juggling ! create_test_db switches the DATABASE_NAME to the TEST_DATABASE_NAME
7373
settings.DATABASES['default']['NAME'] = old_name

0 commit comments

Comments
 (0)