From 7cdd7f3a4585117a35735c0b7f46d98581229fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dion=20H=C3=A4fner?= Date: Thu, 10 Oct 2019 13:01:40 +0200 Subject: [PATCH] :bug: when skipping files --- fowd/cdip.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fowd/cdip.py b/fowd/cdip.py index 182c094..c96d293 100644 --- a/fowd/cdip.py +++ b/fowd/cdip.py @@ -240,6 +240,13 @@ def handle_result(i, result, pbar): logger.info('Processing done') + # remove skipped files + wave_records = [subrecord for subrecord in wave_records if subrecord is not None] + + if not wave_records: + logger.warn('Processed no files - no output to write') + return + # concatenate subrecords wave_records = { key: np.concatenate([subrecord[key] for subrecord in wave_records])