mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-02 18:45:52 +02:00
step inbetween to reduce failure problems
This commit is contained in:
parent
69dd5790cf
commit
159db62a83
|
@ -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.")
|
||||
|
|
Loading…
Reference in New Issue
Block a user