Skip to content

Fix Python3 syntax issue in test_custom_acl_table.py#10673

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_py3_issue_in_custom_acl_test
Nov 8, 2023
Merged

Fix Python3 syntax issue in test_custom_acl_table.py#10673
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_py3_issue_in_custom_acl_test

Conversation

@bingwang-ms
Copy link
Copy Markdown
Collaborator

Description of PR

Summary:
This PR is to fix Python3 syntax issue in test_custom_acl_table.py.
The error message is

if "dualtor" in tbinfo["topo"]["name"]:
>           vlan_name = mg_facts['minigraph_vlans'].keys()[0]
E           TypeError: 'dict_keys' object is not subscriptable

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

This PR is to fix Python3 syntax issue in test_custom_acl_table.py.

How did you do it?

Convert the keys to list explicitly.

How did you verify/test it?

Verified by syntax check.

Any platform specific information?

No.

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

This change is dualtor specific.

Documentation

@bingwang-ms
Copy link
Copy Markdown
Collaborator Author

MSFT ADO: 25744238

@bingwang-ms bingwang-ms merged commit 70824d1 into sonic-net:master Nov 8, 2023
@bingwang-ms bingwang-ms deleted the fix_py3_issue_in_custom_acl_test branch November 8, 2023 06:23
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Nov 9, 2023
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202305: #10687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants