Skip to content

Commit

Permalink
fixed naming error
Browse files Browse the repository at this point in the history
  • Loading branch information
XaverStiensmeier committed Sep 15, 2023
1 parent a274851 commit 20095ba
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ def select_image(start_worker_group, connection):
image = next((elem for elem in active_images if re.match(image, elem)), None)
if not image:
logging.warning(f"Couldn't find image '{old_image}'.")
if isinstance(start_worker_group.get("fallbackOnOtherImage"), str):
if isinstance(start_worker_group.get("fallback_on_other_image"), str):
image = next(
elem for elem in active_images if re.match(start_worker_group["fallbackOnOtherImage"], elem))
logging.info(f"Taking first regex ('{start_worker_group['fallbackOnOtherImage']}') match '{image}'.")
elif start_worker_group.get("fallbackOnOtherImage", False):
elem for elem in active_images if re.match(start_worker_group["fallback_on_other_image"], elem))
logging.info(f"Taking first regex ('{start_worker_group['fallback_on_other_image']}') match '{image}'.")
elif start_worker_group.get("fallback_on_other_image", False):
image = difflib.get_close_matches(old_image, active_images)[0]
logging.info(f"Taking closest active image (in name) '{image}' instead.")
else:
Expand Down

0 comments on commit 20095ba

Please sign in to comment.