From 159db62a83bb4f8c58e1ad36e92b51ddab681115 Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Wed, 6 Jul 2022 13:08:25 -0400 Subject: [PATCH] step inbetween to reduce failure problems --- updateHostsFile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index 45a008a05..12896c785 100755 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -1301,7 +1301,8 @@ def move_hosts_file_into_place(final_file): try: with open(target_file, "w") as target_stream: with open(filename, "r") as source_stream: - target_stream.write(source_stream.read()) + source = source_stream.read() + target_stream.write(source) return True except Exception: print_failure(f"Replacing content of {target_file} failed.")