Skip to content

Commit

Permalink
Convert the output of 'arp -n' from bytes to str. (#1279)
Browse files Browse the repository at this point in the history
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 <bingwang@microsoft.com>
  • Loading branch information
bingwang-ms authored Dec 2, 2020
1 parent 3e2bfa8 commit 04dd841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/nbrshow
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class NbrBase(object):
"""
Fetch Neighbor data (ARP/IPv6 Neigh) from kernel.
"""
p = subprocess.Popen(self.cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen(self.cmd, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(output, err) = p.communicate()
rc = p.wait()

Expand Down

0 comments on commit 04dd841

Please sign in to comment.