Skip to content

Fix UnboundLocalError in env_check - #411

Open
bssrikanth wants to merge 1 commit into
lop-devops:masterfrom
bssrikanth:fix_deps
Open

bssrikanth wants to merge 1 commit into
lop-devops:masterfrom
bssrikanth:fix_deps

Conversation

@bssrikanth

Copy link
Copy Markdown
Collaborator

Initialize env_ver_full and env_ver_major from the original OS id before looking up deps_* sections so bootstrap does not crash when a version-specific section is missing.

Error before fix:
UnboundLocalError: cannot access local variable 'env_ver_major'
where it is not associated with a value
(avocado-setup.py env_check, elif CONFIGFILE.has_section('deps_%s' % env_ver_major))

Initialize env_ver_full and env_ver_major from the original OS id
before looking up deps_* sections so bootstrap does not crash when
a version-specific section is missing.

Error before fix:
  UnboundLocalError: cannot access local variable 'env_ver_major'
  where it is not associated with a value
  (avocado-setup.py env_check, elif CONFIGFILE.has_section('deps_%s' % env_ver_major))

Signed-off-by: Srikanth Aithal <srikanth.aithal@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant