Commit 6f3827d0 by rfkelly0

fix RemoteFileBuffer.truncate() when size is None

parent f8c0a39d
...@@ -139,7 +139,10 @@ class RemoteFileBuffer(object): ...@@ -139,7 +139,10 @@ class RemoteFileBuffer(object):
try: try:
if isinstance(self.file,SpooledTemporaryFile): if isinstance(self.file,SpooledTemporaryFile):
# SpooledTemporaryFile.truncate doesn't accept size argument. # SpooledTemporaryFile.truncate doesn't accept size argument.
self.file._file.truncate(size) if size is None:
self.file._file.truncate()
else:
self.file._file.truncate(size)
else: else:
self.file.truncate(size) self.file.truncate(size)
self.flush() self.flush()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment