Make filesystem list unique

This commit is contained in:
Ryan Horiguchi committed 2023-03-20 18:29:03 +01:00
1 parent 43e9ed3696
commit 09c66999eb
1 file changed
+3 -2
+3 -2
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