From: Daan De Meyer Date: Tue, 2 Nov 2021 12:27:26 +0000 (+0000) Subject: Remove check=True argument from calls to run() X-Git-Tag: v11~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a88e9fb0d0e2fc55c679a4c29f452ecdb0812978;p=thirdparty%2Fmkosi.git Remove check=True argument from calls to run() check=True is the default for our version of run() so let's not pass check=True explicitly anywhere whenever we call run(). --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 61a8a4881..9775fa421 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -3329,7 +3329,7 @@ def copy_git_files(src: Path, dest: Path, *, source_file_transfer: SourceFileTra if source_file_transfer == SourceFileTransfer.copy_git_others: what_files += ["--others", "--exclude=.mkosi-*"] - c = run(["git", "-C", src, "ls-files", "-z", *what_files], stdout=PIPE, text=False, check=True) + c = run(["git", "-C", src, "ls-files", "-z", *what_files], stdout=PIPE, text=False) files = {x.decode("utf-8") for x in c.stdout.rstrip(b"\0").split(b"\0")} # Add the .git/ directory in as well. @@ -3342,7 +3342,7 @@ def copy_git_files(src: Path, dest: Path, *, source_file_transfer: SourceFileTra files.add(fr) # Get submodule files - c = run(["git", "-C", src, "submodule", "status", "--recursive"], stdout=PIPE, text=True, check=True) + c = run(["git", "-C", src, "submodule", "status", "--recursive"], stdout=PIPE, text=True) submodules = {x.split()[1] for x in c.stdout.splitlines()} # workaround for git-ls-files returning the path of submodules that we will @@ -3354,7 +3354,6 @@ def copy_git_files(src: Path, dest: Path, *, source_file_transfer: SourceFileTra ["git", "-C", os.path.join(src, sm), "ls-files", "-z"] + what_files, stdout=PIPE, text=False, - check=True, ) files |= {os.path.join(sm, x.decode("utf-8")) for x in c.stdout.rstrip(b"\0").split(b"\0")} files -= submodules @@ -3898,8 +3897,7 @@ def patch_root_uuid( part = args.get_partition(PartitionIdentifier.root) assert part is not None - run(["sfdisk", "--part-uuid", loopdev, str(part.number), str(u)], - check=True) + run(["sfdisk", "--part-uuid", loopdev, str(part.number), str(u)]) def extract_partition( @@ -4038,7 +4036,6 @@ def secure_boot_sign( p + ".signed", p, ], - check=True, ) os.rename(p + ".signed", p)