From e9733ca163903b56b06ab15b9ffda9c939f19ca2 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 5 Aug 2020 20:55:31 +0200 Subject: sectracker.xpickle: open file in binary mode --- lib/python/sectracker/xpickle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/python/sectracker/xpickle.py b/lib/python/sectracker/xpickle.py index 32657f15e3..c657958790 100644 --- a/lib/python/sectracker/xpickle.py +++ b/lib/python/sectracker/xpickle.py @@ -42,7 +42,7 @@ def replacefile(path, action): replacing it. The return value is the value returned by the action.""" t_fd, t_name = _tempfile.mkstemp(suffix='.tmp', dir=_os.path.dirname(path)) try: - t = _os.fdopen(t_fd, "w") + t = _os.fdopen(t_fd, "wb") try: result = action(t_name, t) finally: -- cgit v1.2.3