step inbetween to reduce failure problems
authorRuben ten Hove <redacted>
Wed, 6 Jul 2022 17:08:25 +0000 (13:08 -0400)
committerRuben ten Hove <redacted>
Wed, 6 Jul 2022 17:08:25 +0000 (13:08 -0400)
updateHostsFile.py

index 45a008a050551f471c7604ba8094278ede9ea6e5..12896c785326844a2d925ea81430d8d3e3576eb1 100755 (executable)
@@ -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.")
git clone https://git.99rst.org/PROJECT