git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
69dd579
)
step inbetween to reduce failure problems
author
Ruben ten Hove
<redacted>
Wed, 6 Jul 2022 17:08:25 +0000
(13:08 -0400)
committer
Ruben ten Hove
<redacted>
Wed, 6 Jul 2022 17:08:25 +0000
(13:08 -0400)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 45a008a050551f471c7604ba8094278ede9ea6e5..12896c785326844a2d925ea81430d8d3e3576eb1 100755
(executable)
--- 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.")
git clone https://git.99rst.org/PROJECT