Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #964 -- Added helpful error message if there's a problem in run…

…ning the unit tests. Thanks, paolo.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e7e991e86b9f4a3e4e89bcbc08dec32606538250 1 parent 3bf29d2
@adrianholovaty adrianholovaty authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/runtests.py
View
5 tests/runtests.py
@@ -100,8 +100,9 @@ def run_tests(self):
self.output(1, "Creating test database")
try:
cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME)
- except:
- confirm = raw_input("The test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: " % TEST_DATABASE_NAME)
+ except Exception, e:
+ sys.stderr.write("Got an error creating the test database: %s\n" % e)
+ confirm = raw_input("It appears the test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: " % TEST_DATABASE_NAME)
if confirm == 'yes':
cursor.execute("DROP DATABASE %s" % TEST_DATABASE_NAME)
cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME)
Please sign in to comment.
Something went wrong with that request. Please try again.