[3.4] Fix changing instance name with redbot --edit (#5540) (#5722)

(cherry picked from commit 1cf497b128)

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
This commit is contained in:
Red-GitHubBot
2022-06-02 12:44:02 +02:00
committed by GitHub
parent ef43cc53bc
commit 1ffdefc922

View File

@@ -222,7 +222,7 @@ def _edit_instance_name(old_name, new_name, confirm_overwrite, no_prompt):
" run this command with --overwrite-existing-instance flag."
)
elif not no_prompt and confirm("Would you like to change the instance name?", default=False):
name = get_name()
name = get_name("")
if name in _get_instance_names():
print(
"WARNING: An instance already exists with this name. "