should always be bytes

This commit is contained in:
meejah 2024-08-08 17:10:30 -06:00
parent 38fb089422
commit 7042442c97

View File

@ -788,7 +788,7 @@ class StorageServer(service.MultiService):
report_path = get_corruption_report_path( report_path = get_corruption_report_path(
self.corruption_advisory_dir, self.corruption_advisory_dir,
now, now,
si_s, si_s.decode("utf8"),
shnum, shnum,
) )
with open(report_path, "w", encoding="utf-8") as f: with open(report_path, "w", encoding="utf-8") as f:
@ -953,5 +953,5 @@ def get_corruption_report_path(
# windows can't handle colons in the filename # windows can't handle colons in the filename
return os.path.join( return os.path.join(
base_dir, base_dir,
("%s--%s-%d" % (now, str(si_s), shnum)).replace(":","") ("%s--%s-%d" % (now, si_s, shnum)).replace(":","")
) )