Fix EncodingWarning in libregrtest (GH-31654)

This commit is contained in:
Inada Naoki 2022-03-03 16:19:56 +09:00 committed by GitHub
parent 81d968b7c3
commit 3c4abfab0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ def check_fd_deltas(deltas):
msg = '%s leaked %s %s, sum=%s' % (
test_name, deltas, item_name, sum(deltas))
print(msg, file=sys.stderr, flush=True)
with open(fname, "a") as refrep:
with open(fname, "a", encoding="utf-8") as refrep:
print(msg, file=refrep)
refrep.flush()
failed = True