Commit c440920
[tests/crm] Fix python3 syntax error in
What is the motivation for this PR?
Fix a python3 syntax error in testcase crm/test_crm.py::test_acl_entry. In python2 dict.keys() returns a list object, but in python3 it returns a dict_keys object which is not sortable.
How did you do it?
Use sorted() function instead of dict.keys().sort(). sorted() function can put the keys of a dict in a list in sorted order, and it has same action in Python2 and Python3.
How did you verify/test it?
Verified by running testcase on Marvell testbed.
Signed-off-by: Zhijian Li <zhijianli@microsoft.com>test_acl_entry (sonic-net#9208)1 parent a08b96e commit c440920
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
913 | | - | |
914 | | - | |
| 913 | + | |
915 | 914 | | |
916 | 915 | | |
917 | 916 | | |
| |||
0 commit comments