added/fixed comments

This commit is contained in:
Andreas Preikschat 2011-10-31 15:18:22 +01:00
parent e402b72d58
commit dad7e86f06
1 changed files with 2 additions and 1 deletions

View File

@ -78,10 +78,11 @@ class OpenLP1SongImport(SongImport):
connection = sqlite.connect(self.importSource, mode=0444,
encoding=(encoding, 'replace'))
cursor = connection.cursor()
# Determine if we're using a new or an old DB.
# Determine if the db supports linking audio to songs.
cursor.execute(u'SELECT name FROM sqlite_master '
u'WHERE type = \'table\' AND name = \'tracks\'')
db_has_tracks = len(cursor.fetchall()) > 0
# Determine if the db contains theme information.
cursor.execute(u'SELECT name FROM sqlite_master '
u'WHERE type = \'table\' AND name = \'settings\'')
db_has_themes = len(cursor.fetchall()) > 0