summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2018-11-14 21:17:51 +0100
committerintrigeri <intrigeri@boum.org>2018-11-27 11:20:35 +0000
commit278c02ca55b8636e199088e2a8b6b457db988132 (patch)
tree7b2c16e50dac18ff8c94b2ac7110a359bbefd121
parentca31b0039c6ec20c03b3a8fce17521a568e4ef59 (diff)
Simplify code (refs: #15984)
-rwxr-xr-xauto/scripts/create-usb-image-from-iso11
1 files changed, 2 insertions, 9 deletions
diff --git a/auto/scripts/create-usb-image-from-iso b/auto/scripts/create-usb-image-from-iso
index 243fdb7..fb5459b 100755
--- a/auto/scripts/create-usb-image-from-iso
+++ b/auto/scripts/create-usb-image-from-iso
@@ -279,16 +279,9 @@ class ImageCreator(object):
def update_config(self, infile, outfile):
with open(infile) as f_in:
- lines = f_in.readlines()
-
- new_lines = list()
-
- for line in lines:
- line = re.sub('/isolinux/', '/syslinux/', line)
- new_lines.append(line)
-
+ lines = [re.sub('/isolinux/', '/syslinux/', line) for line in f_in]
with open(outfile, "w") as f_out:
- f_out.writelines(new_lines)
+ f_out.writelines(lines)
def install_mbr(self):
logger.info("Installing MBR")