X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Finp.py;h=d4e6cc1ff730f09f3dc403bdb213e928da4dbd54;hb=e024316d57d1b879bdedcc3c80d6583fd86a7b3c;hp=db0a3d834baf41c5bb7a195a12047d2ceb07c3df;hpb=e53f480b62166cc8028f1d6e4fda307ad7af2233;p=m_librarian.git diff --git a/m_librarian/inp.py b/m_librarian/inp.py index db0a3d8..d4e6cc1 100644 --- a/m_librarian/inp.py +++ b/m_librarian/inp.py @@ -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)