projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99ecee2
)
Fix duplicate Syslinux entries (2)
author
Tomáš Virtus
<nechtom@gmail.com>
Wed, 19 Feb 2020 14:14:30 +0000
(15:14 +0100)
committer
Tomáš Virtus
<nechtom@gmail.com>
Wed, 19 Feb 2020 14:14:30 +0000
(15:14 +0100)
Commit
f0e3c936
changed open mode to "r+", but this mode does not create
missing files.
Revert open mode back to "a+" and add seek to beginning of the file.
grml2usb
patch
|
blob
|
history
diff --git
a/grml2usb
b/grml2usb
index
5a94e10
..
6cf456a
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-1323,7
+1323,8
@@
def add_entry_if_not_present(filename, entry):
@filename: name of the file
@entry: data to write to the file
"""
- data = open(filename, "r+")
+ data = open(filename, "a+")
+ data.seek(0)
for line in data:
if line == entry:
break