fixed DreamBeam importer

This commit is contained in:
Andreas Preikschat 2013-07-13 17:35:47 +02:00
parent cf9768aa2e
commit 678bb3e2be
1 changed files with 3 additions and 4 deletions

View File

@ -100,12 +100,11 @@ class DreamBeamImport(SongImport):
log.exception(u'XML syntax error in file %s' % file) log.exception(u'XML syntax error in file %s' % file)
self.logError(file, SongStrings.XMLSyntaxError) self.logError(file, SongStrings.XMLSyntaxError)
continue continue
xml = unicode(etree.tostring(parsed_file)) xml = etree.tostring(parsed_file).decode()
song_xml = objectify.fromstring(xml) song_xml = objectify.fromstring(xml)
if song_xml.tag != u'DreamSong': if song_xml.tag != u'DreamSong':
self.logError(file, unicode( self.logError(file,
translate('SongsPlugin.DreamBeamImport', translate('SongsPlugin.DreamBeamImport', 'Invalid DreamBeam song file. Missing DreamSong tag.'))
('Invalid DreamBeam song file. Missing DreamSong tag.'))))
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)