Replace subprocess.call with log_check_call

This commit is contained in:
Anders Ingemann 2015-06-29 17:55:00 +02:00
parent de028c7971
commit ecf549b65d

View file

@ -1,7 +1,7 @@
from bootstrapvz.base import Task from bootstrapvz.base import Task
from bootstrapvz.common import phases from bootstrapvz.common import phases
from bootstrapvz.common.tasks import kernel from bootstrapvz.common.tasks import kernel
import subprocess from bootstrapvz.common.tools import log_check_call
import os.path import os.path
from . import assets from . import assets
@ -16,4 +16,4 @@ class PatchUdev(Task):
# c.f. http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=61e055638cea # c.f. http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=61e055638cea
with open(os.path.join(assets, 'udev.diff')) as diff_file: with open(os.path.join(assets, 'udev.diff')) as diff_file:
udev_dir = os.path.join(info.root, 'usr/share/initramfs-tools/scripts/init-top') udev_dir = os.path.join(info.root, 'usr/share/initramfs-tools/scripts/init-top')
subprocess.call(['patch', '--no-backup-if-mismatch', '-p6', '-d' + udev_dir], stdin=diff_file) log_check_call(['patch', '--no-backup-if-mismatch', '-p6', '-d' + udev_dir], stdin=diff_file)