fixed FoliPresenter importer

This commit is contained in:
Andreas Preikschat 2013-07-13 17:45:55 +02:00
parent f37748ba51
commit 7bb5d6afbd

View File

@ -126,11 +126,10 @@ class FoilPresenterImport(SongImport):
for file_path in self.import_source: for file_path in self.import_source:
if self.stop_import_flag: if self.stop_import_flag:
return return
self.import_wizard.increment_progress_bar( self.import_wizard.increment_progress_bar(WizardStrings.ImportingType % os.path.basename(file_path))
WizardStrings.ImportingType % os.path.basename(file_path))
try: try:
parsed_file = etree.parse(file_path, parser) parsed_file = etree.parse(file_path, parser)
xml = unicode(etree.tostring(parsed_file)) xml = etree.tostring(parsed_file).decode()
self.FoilPresenter.xml_to_song(xml) self.FoilPresenter.xml_to_song(xml)
except etree.XMLSyntaxError: except etree.XMLSyntaxError:
self.logError(file_path, SongStrings.XMLSyntaxError) self.logError(file_path, SongStrings.XMLSyntaxError)