Make filesystem list unique

This commit is contained in:
Ryan Horiguchi 2023-03-19 22:32:43 +01:00
parent 43e9ed3696
commit 09c66999eb
No known key found for this signature in database
GPG Key ID: CA7EE98D45A1132A

View File

@ -185,8 +185,9 @@ class Plugin(GlancesPlugin):
else:
stats.append(fs_current)
# Update the stats
self.stats = stats
# Create unique list filter by "mnt_point" and update the stats
seen = set()
self.stats = [seen.add(stat['mnt_point']) or stat for stat in stats if stat['mnt_point'] not in seen]
return self.stats