Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor disk usage tracking and handling #7716

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Nov 23, 2023

  • Refactored the get_disk_usage method to return an optional named tuple instead of a list
  • Updated the code to handle exceptions when retrieving disk usage information using psutil.disk_usage
  • Added a new test case to verify that disk usage is None when an exception occurs in psutil.disk_usage

This commit improves the reliability and error handling of disk usage tracking in the resource monitor component.

Fixes #7712

@drew2a drew2a marked this pull request as ready for review November 23, 2023 14:34
@drew2a drew2a requested review from a team and egbertbouman and removed request for a team November 23, 2023 14:34
- Refactored the `get_disk_usage` method to return an optional named tuple instead of a list
- Updated the code to handle exceptions when retrieving disk usage information using `psutil.disk_usage`
- Added a new test case to verify that disk usage is None when an exception occurs in `psutil.disk_usage`

This commit improves the reliability and error handling of disk usage tracking in the resource monitor component.
@drew2a drew2a merged commit 5c309d3 into Tribler:main Nov 27, 2023
15 checks passed
@drew2a drew2a deleted the fix/7712 branch November 27, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[7.12.1] FileNotFoundError: [Errno 2] No such file or directory: '/home/<user>/.Tribler/7.12'
2 participants