sync: TeeStringIO write should return int

Change-Id: I211776a493cad4b005c6e201833e9700def2feb9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390657
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Daniel Kutik <daniel.kutik@lavawerk.com>
Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com>
This commit is contained in:
Daniel Kutik 2023-10-23 21:16:04 +02:00 committed by LUCI
parent 1fd5c4bdf2
commit b0430b5bc5

View File

@ -185,9 +185,10 @@ class TeeStringIO(io.StringIO):
def write(self, s: str) -> int: def write(self, s: str) -> int:
"""Write to additional destination.""" """Write to additional destination."""
super().write(s) ret = super().write(s)
if self.io is not None: if self.io is not None:
self.io.write(s) self.io.write(s)
return ret
class Sync(Command, MirrorSafeCommand): class Sync(Command, MirrorSafeCommand):