[elbe-devel] [PATCH v3 47/52] Fix style in hdimg.py
Torben Hohn
torben.hohn at linutronix.de
Fri Jul 5 13:30:24 CEST 2019
On Thu, Jun 27, 2019 at 02:45:01PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
>
> Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/hdimg.py | 30 +++++++++---------------------
> 1 file changed, 9 insertions(+), 21 deletions(-)
>
> diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> index 92414421..34093423 100644
> --- a/elbepack/hdimg.py
> +++ b/elbepack/hdimg.py
> @@ -126,8 +126,8 @@ def build_image_mtd(mtd, target):
> subp = ""
>
> try:
> - do("ubinize %s -o %s -p %s -m %s %s/%s_%s.cfg" % (
> - subp,
> + do("ubinize %s -o %s -p %s -m %s %s/%s_%s.cfg" %
> + (subp,
> os.path.join(target, mtd.text("name")),
> ubivg.text("physicaleraseblocksize"),
> ubivg.text("miniosize"),
> @@ -187,17 +187,10 @@ class grubinstaller202(grubinstaller_base):
> do('mount /dev/mapper/poop0p%d %s' %
> (self.boot_efi.partnum, os.path.join(imagemnt, "boot/efi")))
>
> - do("mount --bind /dev %s" %
> - os.path.join(imagemnt, "dev"))
> -
> - do("mount --bind /proc %s" %
> - os.path.join(imagemnt, "proc"))
> -
> - do("mount --bind /sys %s" %
> - os.path.join(imagemnt, "sys"))
> -
> - do('mkdir -p "%s"' %
> - os.path.join(imagemnt, "boot/grub"))
> + do("mount --bind /dev %s" % os.path.join(imagemnt, "dev"))
> + do("mount --bind /proc %s" % os.path.join(imagemnt, "proc"))
> + do("mount --bind /sys %s" % os.path.join(imagemnt, "sys"))
> + do('mkdir -p "%s"' % os.path.join(imagemnt, "boot/grub"))
>
> devmap = open(os.path.join(imagemnt, "boot/grub/device.map"), "w")
> devmap.write("(hd0) /dev/poop0\n")
> @@ -217,14 +210,9 @@ class grubinstaller202(grubinstaller_base):
> finally:
> os.unlink(os.path.join(imagemnt, "boot/grub/device.map"))
>
> - do("umount %s" % os.path.join(imagemnt, "dev"),
> - allow_fail=True)
> -
> - do("umount %s" % os.path.join(imagemnt, "proc"),
> - allow_fail=True)
> -
> - do("umount %s" % os.path.join(imagemnt, "sys"),
> - allow_fail=True)
> + do("umount %s" % os.path.join(imagemnt, "dev"), allow_fail=True)
> + do("umount %s" % os.path.join(imagemnt, "proc"), allow_fail=True)
> + do("umount %s" % os.path.join(imagemnt, "sys"), allow_fail=True)
>
> if self.boot_efi:
> do('umount /dev/mapper/poop0p%d' %
> --
> 2.11.0
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list