From 3a66ec1c95447e0e812cab67d7d6d44461fd6abe Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 27 Jun 2018 14:20:11 +0200 Subject: [PATCH] [bugfix] print a warning in case saveData fails --- PyLoT.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PyLoT.py b/PyLoT.py index 0ff010ea..86199243 100755 --- a/PyLoT.py +++ b/PyLoT.py @@ -1428,7 +1428,10 @@ class MainWindow(QMainWindow): def exportAllEvents(self, outformats=['.xml']): for event in self.project.eventlist: self.get_data().setEvtData(event) - self.saveData(event, event.path, outformats) + try: + self.saveData(event, event.path, outformats) + except Exception as e: + print('WARNING! Could not save event {}. Reason: {}'.format(event.path, e)) def enableSaveEventAction(self): self.saveEventAction.setEnabled(True)