Skip to content

Commit

Permalink
fix truncate size nullable (#789)
Browse files Browse the repository at this point in the history
Co-authored-by: Itamar Turner-Trauring <itamar@itamarst.org>
Co-authored-by: Hervé Beraud <hberaud@redhat.com>
  • Loading branch information
3 people committed Jan 18, 2024
1 parent 8f5ebf1 commit 6ee471d
Showing 1 changed file with 2 additions and 0 deletions.
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 @@ def close(self):
setattr(self, method, _operation_on_closed_file)

def truncate(self, size=-1):
if size is None:
size = -1
if size == -1:
size = self.tell()
try:
Expand Down

0 comments on commit 6ee471d

Please sign in to comment.