From 24736720084869a114c6d4a42fc4fb022f2dfa74 Mon Sep 17 00:00:00 2001 From: olivier Date: Fri, 15 Sep 2023 13:28:53 +0100 Subject: [PATCH] when the number of expected devices is undefined, do not raise but warn and exit --- iblrig/transfer_experiments.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iblrig/transfer_experiments.py b/iblrig/transfer_experiments.py index 6bdf58bed..4a9dd1e89 100644 --- a/iblrig/transfer_experiments.py +++ b/iblrig/transfer_experiments.py @@ -199,7 +199,9 @@ def finalize_copy(self, number_of_expected_devices=None): At the end of the copy, check if all the files are there and if so, aggregate the device files :return: """ - assert number_of_expected_devices + if number_of_expected_devices is None: + log.warning(f"Number of expected devices is not specified, will not finalize this session {self.session_path}") + return ready_to_finalize = 0 files_stub = list(self.file_remote_experiment_description.parent.glob('*.yaml')) for file_stub in files_stub: