From 62f34e4a11f30b00eaaacc0baf2d0ac4417eea78 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sun, 22 Feb 2015 16:36:16 +0100 Subject: [PATCH] glances_ip: fix IP with Python 3 --- glances/plugins/glances_ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glances/plugins/glances_ip.py b/glances/plugins/glances_ip.py index b4acf957..28791ba3 100644 --- a/glances/plugins/glances_ip.py +++ b/glances/plugins/glances_ip.py @@ -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