1
0
mirror of https://github.com/django/django.git synced 2025-07-03 17:29:12 +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:
Adrian Holovaty 2005-11-24 03:41:49 +00:00
parent fa0436809c
commit ab45bbbb02

View File

@ -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)