[bugfix] print a warning in case saveData fails
This commit is contained in:
parent
19f943627a
commit
3a66ec1c95
5
PyLoT.py
5
PyLoT.py
@ -1428,7 +1428,10 @@ class MainWindow(QMainWindow):
|
|||||||
def exportAllEvents(self, outformats=['.xml']):
|
def exportAllEvents(self, outformats=['.xml']):
|
||||||
for event in self.project.eventlist:
|
for event in self.project.eventlist:
|
||||||
self.get_data().setEvtData(event)
|
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):
|
def enableSaveEventAction(self):
|
||||||
self.saveEventAction.setEnabled(True)
|
self.saveEventAction.setEnabled(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user