mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
new-admin: Changed runtests.py not to display full exception if test database can't be created
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fa0436809c
commit
ab45bbbb02
@ -100,8 +100,7 @@ class TestRunner:
|
|||||||
self.output(1, "Creating test database")
|
self.output(1, "Creating test database")
|
||||||
try:
|
try:
|
||||||
cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME)
|
cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME)
|
||||||
except Exception, e:
|
except:
|
||||||
self.output(0, "There was an error creating the test database:%s " % str(e))
|
|
||||||
confirm = raw_input("The test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: " % TEST_DATABASE_NAME)
|
confirm = raw_input("The test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: " % TEST_DATABASE_NAME)
|
||||||
if confirm == 'yes':
|
if confirm == 'yes':
|
||||||
cursor.execute("DROP DATABASE %s" % TEST_DATABASE_NAME)
|
cursor.execute("DROP DATABASE %s" % TEST_DATABASE_NAME)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user