Better detection of missing taxonomy
This commit is contained in:
@ -306,7 +306,7 @@ def run(config):
|
|||||||
# Open taxonomy if there is one
|
# Open taxonomy if there is one
|
||||||
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
||||||
taxo_uri = open_uri(config['obi']['taxoURI'])
|
taxo_uri = open_uri(config['obi']['taxoURI'])
|
||||||
if taxo_uri is None:
|
if taxo_uri is None or taxo_uri[2] == bytes:
|
||||||
raise Exception("Couldn't open taxonomy")
|
raise Exception("Couldn't open taxonomy")
|
||||||
taxo = taxo_uri[1]
|
taxo = taxo_uri[1]
|
||||||
else :
|
else :
|
||||||
|
2
python/obitools3/commands/grep.pyx
Executable file → Normal file
2
python/obitools3/commands/grep.pyx
Executable file → Normal file
@ -290,7 +290,7 @@ def run(config):
|
|||||||
|
|
||||||
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
||||||
taxo_uri = open_uri(config["obi"]["taxoURI"])
|
taxo_uri = open_uri(config["obi"]["taxoURI"])
|
||||||
if taxo_uri is None:
|
if taxo_uri is None or taxo_uri[2] == bytes:
|
||||||
raise Exception("Couldn't open taxonomy")
|
raise Exception("Couldn't open taxonomy")
|
||||||
taxo = taxo_uri[1]
|
taxo = taxo_uri[1]
|
||||||
else :
|
else :
|
||||||
|
@ -146,7 +146,7 @@ def run(config):
|
|||||||
|
|
||||||
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
||||||
taxo_uri = open_uri(config['obi']['taxoURI'])
|
taxo_uri = open_uri(config['obi']['taxoURI'])
|
||||||
if taxo_uri is None:
|
if taxo_uri is None or taxo_uri[2] == bytes:
|
||||||
raise Exception("Couldn't open taxonomy")
|
raise Exception("Couldn't open taxonomy")
|
||||||
taxo = taxo_uri[1]
|
taxo = taxo_uri[1]
|
||||||
else :
|
else :
|
||||||
|
@ -526,7 +526,7 @@ def run(config):
|
|||||||
|
|
||||||
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
if 'taxoURI' in config['obi'] and config['obi']['taxoURI'] is not None:
|
||||||
taxo_uri = open_uri(config['obi']['taxoURI'])
|
taxo_uri = open_uri(config['obi']['taxoURI'])
|
||||||
if taxo_uri is None:
|
if taxo_uri is None or taxo_uri[2] == bytes:
|
||||||
raise RollbackException("Couldn't open taxonomy, rollbacking view", o_view)
|
raise RollbackException("Couldn't open taxonomy, rollbacking view", o_view)
|
||||||
taxo = taxo_uri[1]
|
taxo = taxo_uri[1]
|
||||||
else :
|
else :
|
||||||
|
Reference in New Issue
Block a user