From c530e4c1ad8bd0ba68c6302e04a507df546f4170 Mon Sep 17 00:00:00 2001 From: Oliver Schwengers Date: Thu, 18 Nov 2021 13:45:00 +0100 Subject: [PATCH] add whitespace-only taxon parameter checks --- bakta/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bakta/config.py b/bakta/config.py index be07c5c4..75d05acc 100644 --- a/bakta/config.py +++ b/bakta/config.py @@ -148,6 +148,7 @@ def setup(args): global genus, species, strain, plasmid, taxon genus = args.genus if(genus is not None): + genus = genus.trim() if(genus == ''): log.error("Empty 'genus' parameter! genus=%s", genus) sys.exit(f"ERROR: empty 'genus' parameter!") @@ -156,6 +157,7 @@ def setup(args): log.info('genus=%s', genus) species = args.species if(species is not None): + species = species.trim() if(species == ''): log.error("Empty 'species' parameter! species=%s", species) sys.exit(f"ERROR: empty 'species' parameter!") @@ -164,6 +166,7 @@ def setup(args): log.info('species=%s', species) strain = args.strain if(strain is not None): + strain = strain.trim() if(strain == ''): log.error("Empty 'strain' parameter! strain=%s", species) sys.exit(f"ERROR: empty 'strain' parameter!")