Skip to content

Commit

Permalink
add whitespace-only taxon parameter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Nov 18, 2021
1 parent aa3ad11 commit c530e4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bakta/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand All @@ -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!")
Expand All @@ -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!")
Expand Down

0 comments on commit c530e4c

Please sign in to comment.