fix: use raw strings for regex parameter in get_string_input (#612)

fixes #602

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2025-01-03 22:10:39 +01:00
committed by GitHub
parent 4ae5a37ec6
commit 3852464ab7
2 changed files with 3 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ def change_system_hostname() -> None:
)
hostname = get_string_input(
"Enter the new hostname",
regex="^[a-z0-9]+([a-z0-9-]*[a-z0-9])?$",
regex=r"^[a-z0-9]+([a-z0-9-]*[a-z0-9])?$",
)
if not get_confirm(f"Change the hostname to '{hostname}'?", default_choice=False):
Logger.print_info("Aborting hostname change ...")