Fix calling subprocesses

We shouldn't unpack the list. The first argument is allowed to be a list. If we unpack it, it'll override other arguments to the call function that would be the wrong type then (buffer size).

Contributes to issue CURA-9409.
This commit is contained in:
Ghostkeeper 2022-06-30 11:48:22 +02:00
parent 254edfd3ec
commit f3fd2d6f80
No known key found for this signature in database
GPG key ID: 68F39EA88EEED5FF

View file

@ -47,13 +47,13 @@ def copy_metadata_files():
def generate_appimage():
appimage_path = os.path.join(dist_path, appimage_filename)
command = ["appimagetool", "--appimage-extract-and-run", f"{dist_path}/", appimage_path]
result = subprocess.call(*command)
result = subprocess.call(command)
if result != 0:
raise RuntimeError(f"The AppImageTool command returned non-zero: {result}")
def sign_appimage():
appimage_path = os.path.join(dist_path, appimage_filename)
command = ["gpg", "--yes", "--armor", "--detach-sig", {appimage_path}]
result = subprocess.call(*command)
command = ["gpg", "--yes", "--armor", "--detach-sig", appimage_path]
result = subprocess.call(command)
if result != 0:
raise RuntimeError(f"The GPG command returned non-zero: {result}")