[entropy.db] always create packagespmrepository table if not available

This commit is contained in:
Fabio Erculiani
2010-02-21 00:14:14 +01:00
parent 8b4374b10c
commit 83f336f7ec
+3
View File
@@ -2283,6 +2283,9 @@ class EntropyRepository(EntropyRepositoryPluginStore, TextInterface):
@param repository: Source Package Manager repository
@type repository: string
"""
# FIXME backward compatibility
if not self._doesTableExist('packagespmrepository'):
self._createPackagespmrepository()
self._cursor().execute("""
INSERT INTO packagespmrepository VALUES (?,?)
""", (idpackage, repository,))