Compare commits

..

2 Commits

2 changed files with 10 additions and 6 deletions

View File

@ -1011,7 +1011,7 @@ class MainWindow(QMainWindow):
for event in events:
for filename in filenames:
if os.path.isfile(filename) and event.pylot_id in filename:
self.load_data(filename, draw=False, event=event, ask_user=True, merge_strategy=sld.merge_strategy)
self.load_data(filename, draw=False, event=event, ask_user=False, merge_strategy=sld.merge_strategy)
refresh = True
if not refresh:
return
@ -1020,8 +1020,8 @@ class MainWindow(QMainWindow):
self.fill_eventbox()
self.setDirty(True)
def load_data(self, fname=None, loc=False, draw=True, event=None, ask_user=False, merge_strategy='Overwrite'):
if not ask_user:
def load_data(self, fname=None, loc=False, draw=True, event=None, ask_user=True, merge_strategy='Overwrite',):
if ask_user:
if not self.okToContinue():
return
if fname is None:
@ -1034,7 +1034,7 @@ class MainWindow(QMainWindow):
if not event:
event = self.get_current_event()
if event.picks:
if event.picks and ask_user:
qmb = QMessageBox(self, icon=QMessageBox.Question,
text='Do you want to overwrite the data?',)
overwrite_button = qmb.addButton('Overwrite', QMessageBox.YesRole)

View File

@ -447,8 +447,12 @@ def correlation_main(database_path_dmt: str, pylot_infile_path: str, params: dic
if event_blacklist and get_event_id(eventdir) in event_blacklist:
logging.info('Event on blacklist. Continue')
correlate_event(eventdir, pylot_parameter, params=params, channel_config=channel_config,
update=update)
try:
correlate_event(eventdir, pylot_parameter, params=params, channel_config=channel_config,
update=update)
except Exception as e:
logging.error(f'Could not correlate event {eventindex}: {e}')
continue
logging.info('Finished script after {} at {}'.format(datetime.now() - tstart, datetime.now()))