mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-30 04:32:00 +03:00
Error with IP Plugin : object has no attribute #1528
This commit is contained in:
parent
38fcc24e65
commit
bf681f6737
@ -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('.'))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user