Skip to content

Commit 04dd841

Browse files
authored
Convert the output of 'arp -n' from bytes to str. (sonic-net#1279)
The output of 'arp -n' is bytes in python3, as a result, the search of 'ether' or other str failed. This commit address the issue. Signed-off-by: bingwang <[email protected]>
1 parent 3e2bfa8 commit 04dd841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/nbrshow

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class NbrBase(object):
106106
"""
107107
Fetch Neighbor data (ARP/IPv6 Neigh) from kernel.
108108
"""
109-
p = subprocess.Popen(self.cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
109+
p = subprocess.Popen(self.cmd, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
110110
(output, err) = p.communicate()
111111
rc = p.wait()
112112

0 commit comments

Comments
 (0)