6346: If a exporter plugin crashes, the Export Assistant can't be closed
svn: r21806
This commit is contained in:
parent
c5982a4514
commit
cfd162ec85
@ -579,19 +579,25 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
|
|||||||
Depending on the success status, set the text for the final page.
|
Depending on the success status, set the text for the final page.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if (self.option_box_instance and
|
success = False
|
||||||
hasattr(self.option_box_instance, "no_fileselect")):
|
try:
|
||||||
filename = ""
|
if (self.option_box_instance and
|
||||||
else:
|
hasattr(self.option_box_instance, "no_fileselect")):
|
||||||
filename = get_unicode_path_from_file_chooser(self.chooser.get_filename())
|
filename = ""
|
||||||
config.set('paths.recent-export-dir', os.path.split(filename)[0])
|
else:
|
||||||
ix = self.get_selected_format_index()
|
filename = get_unicode_path_from_file_chooser(self.chooser.get_filename())
|
||||||
config.set('behavior.recent-export-type', ix)
|
config.set('paths.recent-export-dir', os.path.split(filename)[0])
|
||||||
export_function = self.map_exporters[ix].get_export_function()
|
ix = self.get_selected_format_index()
|
||||||
success = export_function(self.dbstate.db,
|
config.set('behavior.recent-export-type', ix)
|
||||||
filename,
|
export_function = self.map_exporters[ix].get_export_function()
|
||||||
User(error=ErrorDialog, callback=self.callback),
|
success = export_function(self.dbstate.db,
|
||||||
self.option_box_instance)
|
filename,
|
||||||
|
User(error=ErrorDialog, callback=self.callback),
|
||||||
|
self.option_box_instance)
|
||||||
|
except:
|
||||||
|
#an error not catched in the export_function itself
|
||||||
|
success = False
|
||||||
|
log.error(_("Error exporting your family tree"), exc_info=True)
|
||||||
return success
|
return success
|
||||||
|
|
||||||
def pre_save(self,page):
|
def pre_save(self,page):
|
||||||
|
Loading…
Reference in New Issue
Block a user