Commit 8c60fe76 authored by Nicolas  MAILLET's avatar Nicolas MAILLET
Browse files

bugfix, protect name of a new enzyme to another one can't take the same

parent f48e49bf
......@@ -252,8 +252,7 @@ def user_creation_enzyme(all_enzymes):
.. warning:: It could be a problem to immediately use the new enzyme (see in-code warning)
add_enzyme = "y"
# Adding enzyme
while add_enzyme == "y":
# All enzymes name
all_name_enz = set()
......@@ -261,6 +260,9 @@ def user_creation_enzyme(all_enzymes):
for enz in all_enzymes:
# Adding enzyme
while add_enzyme == "y":
# Name of the enzyme
name_new_enz = input("Name of the new enzyme?\n")
while not check_enzyme_name(name_new_enz, all_name_enz):
......@@ -317,5 +319,8 @@ def user_creation_enzyme(all_enzymes):
# Write in the user-defined enzymes file
# Add it to known names
# End of this new enzyme
add_enzyme = input("Add an other enzyme? (y/n)\n")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment