Skip to content

Commit

Permalink
Update localiface.py
Browse files Browse the repository at this point in the history
Fix for the error:
File "/app/core/localiface.py", line 286, in writefile written += f.write(chunk, offset=o, size=len(chunk))
TypeError: BufferedWriter.write() takes no keyword arguments
  • Loading branch information
daniel-pro authored May 24, 2024
1 parent 6a097ff commit 0cdee25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/localiface.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ def writefile(endpoint, filepath, userid, content, size, lockmd, islock=False):
chunk = content.read(chunksize)
if len(chunk) == 0:
break
written += f.write(chunk, offset=o, size=len(chunk))
f.seek(o)
written += f.write(chunk)
o += len(chunk)
else:
written = f.write(content)
Expand Down

0 comments on commit 0cdee25

Please sign in to comment.