Changed regex condition

This commit is contained in:
Kevin Veen-Birkenbach 2022-04-04 11:34:42 +02:00
parent cc0496ffa8
commit caf78a82be

View File

@ -74,7 +74,7 @@ for volume_name in volume_names:
# Folder to which the volumes are copied # Folder to which the volumes are copied
volume_destination_dir = version_dir + volume_name volume_destination_dir = version_dir + volume_name
# Database name # Database name
database_name = re.split("_|-", container)[0] database_name = re.split("(_|-)(database|db)", container)[0]
# Entries with database login data concerning this container # Entries with database login data concerning this container
databases_entries = databases.loc[databases['database'] == database_name] databases_entries = databases.loc[databases['database'] == database_name]
if len(databases_entries) == 1: if len(databases_entries) == 1: