glances_ip: fix IP with Python 3

pull/532/head^2
Alessio Sergi 2015-02-22 16:36:16 +01:00
parent e2912943c5
commit 62f34e4a11
1 changed files with 1 additions and 1 deletions

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