Skip to content

Commit

Permalink
Merge pull request #2299 from rhoriguchi/fs-duplicates
Browse files Browse the repository at this point in the history
Make filesystem list unique
  • Loading branch information
nicolargo committed Mar 21, 2023
2 parents 6390eee + 09c6699 commit 7193ad6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions glances/plugins/glances_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ def update(self):
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

Expand Down

0 comments on commit 7193ad6

Please sign in to comment.