mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-01 14:08:34 +03:00
Use comprehensions instead of map/lambda (take 2)
This commit is contained in:
parent
dfe20754f6
commit
9e904d6204
@ -120,4 +120,4 @@ class Plugin(GlancesPlugin):
|
||||
|
||||
Example: '255.255.255.0' will return 24
|
||||
"""
|
||||
return sum(map(lambda x: int(x) << 8, ip.split('.'))) // 8128
|
||||
return sum([int(x) << 8 for x in ip.split('.')]) // 8128
|
||||
|
Loading…
Reference in New Issue
Block a user