glances_ip: fix IP with Python 3

This commit is contained in:
Alessio Sergi 2015-02-22 16:36:16 +01:00
parent e2912943c5
commit 62f34e4a11

View File

@ -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