Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling in piece bitmask generation
Adjusted the method for generating a base64 encoded bitmask of downloaded pieces. Now, it includes a try-except block to handle potential ValueError exceptions that could occur if the list of pieces is corrupted. This change ensures that an empty string is returned instead of allowing the exception to propagate. Additionally, a corresponding test case has been added to verify this new behavior when dealing with corrupted piece lists.
- Loading branch information