]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/inp.py
Fix a minor bug
[m_librarian.git] / m_librarian / inp.py
index db0a3d834baf41c5bb7a195a12047d2ceb07c3df..d4e6cc1ff730f09f3dc403bdb213e928da4dbd54 100644 (file)
@@ -63,8 +63,12 @@ def import_inpx(path):
     inpx = ZipFile(path)
     for name in inpx.namelist():
         archive, ext = os.path.splitext(name)
-        if ext != 'inp':
+        if ext != '.inp':
             continue
         inp = inpx.open(name)
         sqlhub.doInTransaction(import_inp, archive + '.zip', inp)
         inp.close()
+    connection = sqlhub.processConnection
+    if connection.dbName in ('postgres', 'sqlite'):
+        for table in Author, Book, Extension, Genre, Language:
+            connection.query("VACUUM %s" % table.sqlmeta.table)