From dd225a255ff8684d80c35db51453ad9edcfe1356 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Mon, 12 Mar 2018 18:04:53 +0100 Subject: [PATCH] obi uniq: better error checking --- python/obitools3/commands/uniq.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/obitools3/commands/uniq.pyx b/python/obitools3/commands/uniq.pyx index 202c88a..851a5bd 100644 --- a/python/obitools3/commands/uniq.pyx +++ b/python/obitools3/commands/uniq.pyx @@ -481,15 +481,17 @@ def run(config): logger("info","obi uniq") + # Open the input input = open_uri(config['obi']['inputURI']) - + if input is None: + raise Exception("Could not read input view") if input[2] != View_NUC_SEQS: raise NotImplementedError('obi uniq only works on NUC_SEQS views') + # Open the output output = open_uri(config['obi']['outputURI'], input=False, newviewtype=View_NUC_SEQS) - if output is None: raise Exception("Could not create output view")