thoth-station/pipeline-helpers

[1pt] base image updater script fail due to local variable assignment

Closed this issue · 1 comments

The following error hits when there is no base-image value in the config file.
It happens due to reference of loop variable outside of loop

current_version = base_image_url.split(":")[1]

Traceback (most recent call last):
  File "/opt/app-root/src/bump_base_image_version.py", line 122, in <module>
    bump_base_image_versions()
  File "/opt/app-root/src/bump_base_image_version.py", line 113, in bump_base_image_versions
    current_version = base_image_url.split(":")[1]
UnboundLocalError: local variable 'base_image_url' referenced before assignment

/triage accepted
/lifecycle active
/sig devsecops
/priority important-soon