forked from openlp/openlp
Fix tracebacks, if user has no internet connection and he still presses Finish.
This commit is contained in:
parent
1ce88e7a2a
commit
e5b664663a
@ -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)
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user