From 10c9e90168dae0d301ee6b6ba4afd99b295782f5 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 12 May 2014 16:12:08 -0700 Subject: [PATCH] Indicate when desplit_fastq didn't get any files to process --- htsworkflow/pipelines/desplit_fastq.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htsworkflow/pipelines/desplit_fastq.py b/htsworkflow/pipelines/desplit_fastq.py index 83a9955..c9947a2 100644 --- a/htsworkflow/pipelines/desplit_fastq.py +++ b/htsworkflow/pipelines/desplit_fastq.py @@ -89,7 +89,9 @@ class DesplitFastq(object): This is here so we can run via threading/multiprocessing APIs """ state = SEQ_HEADER + files_read = 0 for stream in self.sources: + files_read += 1 for line in stream: line = line.rstrip() if state == SEQ_HEADER: @@ -106,6 +108,8 @@ class DesplitFastq(object): state = SEQ_HEADER self.destination.write(os.linesep) + if files_read == 0: + raise RuntimeError("No files processed") if __name__ == "__main__": main() -- 2.30.2