1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 23:17:37 +00:00

Oops, bug with closing temp_db file handle.

This commit is contained in:
Samuel Lai 2013-11-28 14:35:24 +11:00
parent bff7e13d83
commit e1272ce58a

View File

@ -780,7 +780,7 @@ def import_site(xml_root, site_name, dump_date, site_desc, site_key,
# create the temporary comments database
print('Connecting to the temporary comments database...')
temp_db_file, temp_db_path = tempfile.mkstemp('.sqlite', 'temp_comment_db-' + site_name.replace('.', '_'), settings.TEMP_COMMENTS_DATABASE_DIR)
temp_db_file.close()
os.close(temp_db_file)
conn_str = 'sqlite://' + temp_db_path
comment_db_sqlhub.processConnection = connectionForURI(conn_str)
print('Connected.\n')