Fix tracebacks, if user has no internet connection and he still presses Finish.

This commit is contained in:
Mattias Põldaru 2011-03-15 01:05:31 +02:00
parent 1ce88e7a2a
commit e5b664663a
2 changed files with 4 additions and 0 deletions

View File

@ -678,6 +678,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
plugin.firstTime()
Receiver.send_message(u'openlp_process_events')
temp_dir = os.path.join(unicode(gettempdir()), u'openlp')
if not os.path.isdir(temp_dir):
return
for filename in os.listdir(temp_dir):
os.remove(os.path.join(temp_dir, filename))
os.removedirs(temp_dir)

View File

@ -255,6 +255,8 @@ class SongsPlugin(Plugin):
"""
db_dir = unicode(os.path.join(gettempdir(), u'openlp'))
song_dbs = []
if not os.path.isdir(db_dir):
return
for sfile in os.listdir(db_dir):
if sfile.startswith(u'songs_') and sfile.endswith(u'.sqlite'):
song_dbs.append(os.path.join(db_dir, sfile))