forked from openlp/openlp
exception and string fix
This commit is contained in:
parent
19ca36f946
commit
f51d67cd51
@ -675,7 +675,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
translate(u'ServiceManager',
|
||||
u'File is not a valid service.\n'
|
||||
u'The content encoding is not UTF-8.'))
|
||||
log.exception(u'Filename "%s" is no valid UTF-8' % \
|
||||
log.exception(u'Filename "%s" is not valid UTF-8' % \
|
||||
file.decode(u'utf-8', u'replace'))
|
||||
continue
|
||||
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))
|
||||
@ -710,7 +710,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
translate(u'ServiceManager',
|
||||
u'File is not a valid service.'))
|
||||
log.exception(u'File contains no service data')
|
||||
except IOError:
|
||||
except (IOError, NameError):
|
||||
log.exception(u'Problem loading a service file')
|
||||
finally:
|
||||
if file_to:
|
||||
|
@ -345,7 +345,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
self, translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager', u'File is not a valid '
|
||||
u'theme.\nThe content encoding is not UTF-8.'))
|
||||
log.exception(u'Filename "%s" is no valid UTF-8' % \
|
||||
log.exception(u'Filename "%s" is not valid UTF-8' % \
|
||||
file.decode(u'utf-8', u'replace'))
|
||||
continue
|
||||
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))
|
||||
@ -385,7 +385,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
self, translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager', u'File is not a valid theme.'))
|
||||
log.exception(u'Theme file dosen\'t contain XML data %s' % filename)
|
||||
except IOError:
|
||||
except (IOError, NameError):
|
||||
QtGui.QMessageBox.critical(
|
||||
self, translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager', u'File is not a valid theme.'))
|
||||
|
Loading…
Reference in New Issue
Block a user