[entropy.db] EntropyRepository._insertProvidedMime(): create provided_mime table if it doesn't exist

This commit is contained in:
Fabio Erculiani
2010-05-02 17:32:20 +02:00
parent e1325bdeae
commit 7edbce99b3
+3
View File
@@ -2331,6 +2331,9 @@ class EntropyRepository(EntropyRepositoryPluginStore, TextInterface):
@param mimetypes: list of mimetypes supported by package
@type mimetypes: list
"""
# FIXME: remove this before 2010-12-31
if not self._doesTableExist("provided_mime"):
self._createProvidedMimeTable()
self._cursor().executemany("""
INSERT INTO provided_mime VALUES (?,?)""",
[(x, idpackage) for x in mimetypes])