Skip to content

set get() default value to dict in order to avoid keys() error#11684

Merged
prgeor merged 1 commit intosonic-net:masterfrom
illia-kotvitskyi:fwutil_conftest_dict_fix
Mar 1, 2024
Merged

set get() default value to dict in order to avoid keys() error#11684
prgeor merged 1 commit intosonic-net:masterfrom
illia-kotvitskyi:fwutil_conftest_dict_fix

Conversation

@illia-kotvitskyi
Copy link
Contributor

@illia-kotvitskyi illia-kotvitskyi commented Feb 12, 2024

Change-Id: I62486e8265c0f90791d79dc72a37305c2e93c33b

Description of PR

Summary:
Fixes AttributeError: 'list' object has no attribute 'keys' error by replacing .get() default value to be dict instead of list in random_component fwutil fixture

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

Avoid AttributeError when dict has no expected key

How did you do it?

Use dict as default value instead of a list

How did you verify/test it?

Run TC, no error is raised

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@illia-kotvitskyi
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@illia-kotvitskyi
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Change-Id: I62486e8265c0f90791d79dc72a37305c2e93c33b
@illia-kotvitskyi
Copy link
Contributor Author

Hi @prgeor, could you please review this PR?

@illia-kotvitskyi
Copy link
Contributor Author

Hi @prgeor, could you please review this PR?

Kindly reminder

@prgeor prgeor merged commit 98112e8 into sonic-net:master Mar 1, 2024
@illia-kotvitskyi illia-kotvitskyi deleted the fwutil_conftest_dict_fix branch March 4, 2024 07:13
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.

3 participants