Skip to content

Commit 8861c64

Browse files
committed
add a logging to define the reason that quit is set true
1 parent 7d98abf commit 8861c64

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ethopy/core/experiment.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,12 @@ def prepare_trial(self) -> None:
487487
"""Prepare trial conditions, stimuli and update trial index."""
488488
old_cond = self.curr_cond
489489
self._get_new_cond()
490-
491-
if not self.curr_cond or self.logger.thread_end.is_set():
490+
if not self.curr_cond:
491+
log.debug("No conditions left to run, stopping experiment.")
492+
self.quit = True
493+
return
494+
if self.logger.thread_end.is_set():
495+
log.debug("thread_end is set, stopping experiment.")
492496
self.quit = True
493497
return
494498
if (

0 commit comments

Comments
 (0)