Skip to content

Commit

Permalink
show [ip|ipv6] interfaces cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos Triantafillis committed Jan 27, 2018
2 parents bd6700d + 0c52587 commit d1f0394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_test_suite():
'click',
'natsort',
'tabulate',
'netifaces',
'netifaces==0.10.6',
],
classifiers=[
'Development Status :: 3 - Alpha',
Expand Down
6 changes: 1 addition & 5 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,7 @@ def interfaces():

ifaddresses = []
for ipaddr in ipaddresses[netifaces.AF_INET6]:
mask = ipaddr['netmask']
if isinstance(mask, str):
netmask = IPAddress(mask).netmask_bits()
elif isinstance(mask, unicode):
netmask = mask.split('/', 1)[-1]
netmask = ipaddr['netmask'].split('/', 1)[-1]
ifaddresses.append(["", str(ipaddr['addr']) + "/" + str(netmask)])

if len(ifaddresses) > 0:
Expand Down

0 comments on commit d1f0394

Please sign in to comment.