Error with IP Plugin : object has no attribute #1528

This commit is contained in:
Nicolas Hennion 2020-12-05 10:03:07 +01:00
parent 38fcc24e65
commit bf681f6737

View File

@ -150,6 +150,9 @@ class Plugin(GlancesPlugin):
"""
# Thanks to @Atticfire
# See https://github.com/nicolargo/glances/issues/1417#issuecomment-469894399
if ip is None:
# Correct issue #1528
return 0
return sum(bin(int(x)).count('1') for x in ip.split('.'))