forked from openlp/openlp
Fixed case when there is no version information
This commit is contained in:
parent
9c11494364
commit
20eab8b917
@ -110,6 +110,13 @@ class DreamBeamImport(SongImport):
|
|||||||
continue
|
continue
|
||||||
if hasattr(song_xml, u'Version'):
|
if hasattr(song_xml, u'Version'):
|
||||||
self.version = float(song_xml.Version.text)
|
self.version = float(song_xml.Version.text)
|
||||||
|
else:
|
||||||
|
log.exception(u'No valid version information.'
|
||||||
|
'Invalid file %s' % file)
|
||||||
|
self.logError(file, unicode(
|
||||||
|
translate('SongsPlugin.DreamBeamImport',
|
||||||
|
('No valid version information.'))))
|
||||||
|
continue
|
||||||
# Version numbers found in DreamBeam Source /FileTypes/Song.cs
|
# Version numbers found in DreamBeam Source /FileTypes/Song.cs
|
||||||
if self.version <= 0.49:
|
if self.version <= 0.49:
|
||||||
if hasattr(song_xml.Text0, u'Text'):
|
if hasattr(song_xml.Text0, u'Text'):
|
||||||
@ -150,10 +157,5 @@ class DreamBeamImport(SongImport):
|
|||||||
LyricsSequenceItem.get(u'Number')))
|
LyricsSequenceItem.get(u'Number')))
|
||||||
if hasattr(song_xml, u'Notes'):
|
if hasattr(song_xml, u'Notes'):
|
||||||
self.comments = unicode(song_xml.Notes.text)
|
self.comments = unicode(song_xml.Notes.text)
|
||||||
else:
|
|
||||||
log.exception(u'No valid version information.'
|
|
||||||
'Invalid file %s' % file)
|
|
||||||
self.logError(file, SongStrings.XMLSyntaxError)
|
|
||||||
continue
|
|
||||||
if not self.finish():
|
if not self.finish():
|
||||||
self.logError(file)
|
self.logError(file)
|
||||||
|
Loading…
Reference in New Issue
Block a user