Fixed #1311 -- manage.py sqlclear no longer assumes database connection is available. Thanks, jakamkon@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-02-02 04:50:16 +00:00
parent 41fac5f9ef
commit 9789766508
1 changed files with 3 additions and 2 deletions

View File

@ -191,6 +191,7 @@ def get_sql_delete(mod):
# Close database connection explicitly, in case this output is being piped # Close database connection explicitly, in case this output is being piped
# directly into a database client, to avoid locking issues. # directly into a database client, to avoid locking issues.
if cursor is not None:
cursor.close() cursor.close()
db.db.close() db.db.close()