Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unicode issue in ipaddress for python2 #1627

Conversation

bingwang-ms
Copy link
Contributor

Signed-off-by: bingwang [email protected]

What I did

This PR is to address the Unicode issue in fast-reboot-dump.py script in 201911.
There is another PR that addresses same issue in master image #1164
However, builtins package is not available in 201911 image.

Python 2.7.13 (default, Apr 16 2021, 14:02:03) 
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import builtins
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named builtins

So, I create this PR for 201911 branch to fix the issue in another way.

How I did it

Add a custom method to convert string to unicode.

How to verify it

Verified on MSN2700, running SONiC.20191130.72.
First populate some FDB entry and ARP entry, and then run fast-reboot-dump.py script. No exception is raised, and we can confirm from syslog that all entries are dumped.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@bingwang-ms bingwang-ms merged commit 5f62262 into sonic-net:201911 May 24, 2021
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
5f62262 (HEAD -> 201911, origin/201911) Fix unicode issue in ipaddress for python2 (sonic-net#1627)

Signed-off-by: Abhishek Dosi <[email protected]>
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.

3 participants