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

fix truncate size can be None #789

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions eventlet/greenio/py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
setattr(self, method, _operation_on_closed_file)

def truncate(self, size=-1):
if size is None:
size = -1

Check warning on line 162 in eventlet/greenio/py3.py

View check run for this annotation

Codecov / codecov/patch

eventlet/greenio/py3.py#L162

Added line #L162 was not covered by tests
if size == -1:
size = self.tell()
try:
Expand Down