mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-11 06:18:11 +03:00
glances_ip: fix IP with Python 3
This commit is contained in:
parent
e2912943c5
commit
62f34e4a11
@ -119,4 +119,4 @@ class Plugin(GlancesPlugin):
|
||||
def ip_to_cidr(ip):
|
||||
# Convert IP address to CIDR
|
||||
# Exemple: '255.255.255.0' will return 24
|
||||
return sum(map(lambda x: int(x) << 8, ip.split('.'))) / 8128
|
||||
return sum(map(lambda x: int(x) << 8, ip.split('.'))) // 8128
|
||||
|
Loading…
Reference in New Issue
Block a user