From 2fb864db5a6f994ba5ffc98996f9f8c0410a1d32 Mon Sep 17 00:00:00 2001 From: Eric DEVEAUD Date: Mon, 13 Jan 2020 12:41:46 +0100 Subject: [PATCH 1/2] typo in argparse choices --- src/taxodb_rrna.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taxodb_rrna.py b/src/taxodb_rrna.py index c25ae16..8faa6dc 100644 --- a/src/taxodb_rrna.py +++ b/src/taxodb_rrna.py @@ -203,7 +203,7 @@ def extract_gg(input=None, bdb=None, sep='||'): metavar="", type=str, required=True, - choices=['silva' 'greengenes']) + choices=['silva', 'greengenes']) args = parser.parse_args() From 09a48dcb54b54b64d148ab1e1f99126715d6031f Mon Sep 17 00:00:00 2001 From: Eric DEVEAUD Date: Mon, 13 Jan 2020 12:58:07 +0100 Subject: [PATCH 2/2] exit1 when input file not found instead of exit 0 --- src/taxodb_rrna.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/taxodb_rrna.py b/src/taxodb_rrna.py index 8faa6dc..6965fae 100644 --- a/src/taxodb_rrna.py +++ b/src/taxodb_rrna.py @@ -216,6 +216,7 @@ def extract_gg(input=None, bdb=None, sep='||'): extract_gg(input=args.fasta, bdb=bdb) except IOError as err: print >> sys.stderr, "Can't open input file %s: %s" % (args.fasta, str(err)) + sys.exit(1) except db.DBAccessError as err: print >> sys.stderr, "Error while opening Berkeley database %s: %s" % (args.accVos_oc, str(err)) sys.exit(1)