summaryrefslogtreecommitdiffstats
path: root/populate.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-01-11 12:34:25 +0800
committerPeng Wu <alexepico@gmail.com>2013-01-11 12:34:25 +0800
commit5ee8671c28f9c9e4fe667d86e5feac97eb8ebe35 (patch)
treea5acef69abee11e54efffbeec758ec239732dd69 /populate.py
parent69ae77b35c57c6d74a5ad54fdafc24623aae2ac8 (diff)
downloadtrainer-5ee8671c28f9c9e4fe667d86e5feac97eb8ebe35.tar.gz
trainer-5ee8671c28f9c9e4fe667d86e5feac97eb8ebe35.tar.xz
trainer-5ee8671c28f9c9e4fe667d86e5feac97eb8ebe35.zip
fixes bug
Diffstat (limited to 'populate.py')
-rw-r--r--populate.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/populate.py b/populate.py
index 28855e6..1414b17 100644
--- a/populate.py
+++ b/populate.py
@@ -155,6 +155,11 @@ def handleBigramPass(indexpath, workdir):
cur.execute(INSERT_BIGRAM_DML, (prefix, postfix, freq))
#print(prefix, postfix, freq)
+ conn.commit()
+
+ if conn:
+ conn.close()
+
def handleOneIndex(indexpath, subdir, indexname):
print(indexpath, subdir, indexname)