From e5437feb4ac2d2dc044e1090b9312dde5ef197e0 Mon Sep 17 00:00:00 2001 From: iaz1607 Date: Thu, 10 Feb 2022 16:45:37 +0300 Subject: Restoring authorship annotation for . Commit 1 of 2. --- library/python/fs/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/python/fs') diff --git a/library/python/fs/__init__.py b/library/python/fs/__init__.py index b1b7cde0799..da4bd711da5 100644 --- a/library/python/fs/__init__.py +++ b/library/python/fs/__init__.py @@ -326,8 +326,8 @@ def write_file(path, data, binary=True): ensure_dir(dir_path) tmp_path = path + '.tmp.' + str(random.random()) with open_file(tmp_path, 'w' + ('b' if binary else '')) as f: - if not isinstance(data, bytes) and binary: - data = data.encode('UTF-8') + if not isinstance(data, bytes) and binary: + data = data.encode('UTF-8') f.write(data) replace_file(tmp_path, path) -- cgit v1.3