From b0cace4be17a3169e12c7ef8906676a3b9ad1ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 30 Jun 2020 22:13:33 +0200 Subject: [PATCH] Fix incorrect grub-mkconfig fallback logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- ecleankernel/bootloader/grub2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecleankernel/bootloader/grub2.py b/ecleankernel/bootloader/grub2.py index abf330b..562eec7 100644 --- a/ecleankernel/bootloader/grub2.py +++ b/ecleankernel/bootloader/grub2.py @@ -38,7 +38,7 @@ def postrm(self) -> None: logging.debug('Calling grub2-mkconfig') try: subprocess.call(['grub-mkconfig', '-o', self.path]) + return except FileNotFoundError: pass - else: - subprocess.call(['grub2-mkconfig', '-o', self.path]) + subprocess.call(['grub2-mkconfig', '-o', self.path])