Fix missing path for song usage report generation

Fixes: https://launchpad.net/bugs/733271
This commit is contained in:
Tim Bentley 2011-03-11 19:02:36 +00:00
parent 735a6c5815
commit f1b8e53e30

View File

@ -88,6 +88,14 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
"""
log.debug(u'accept')
path = unicode(self.fileLineEdit.text())
if path == u'':
Receiver.send_message(u'openlp_error_message', {
u'title': translate('SongUsagePlugin.SongUsageDetailForm',
'Report Creation'),
u'message': unicode(translate(
'SongUsagePlugin.SongUsageDetailForm', 'No output path has been'
' selected for the report.'))})
return
check_directory_exists(path)
filename = unicode(translate('SongUsagePlugin.SongUsageDetailForm',
'usage_detail_%s_%s.txt')) % (