From 0c31f88d2379602c3c0d77f39a6e4536eda2a478 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 8 Nov 2023 21:23:05 +0000 Subject: [PATCH] Return subprocess returncode in decrypt() --- pywidevine/cdm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywidevine/cdm.py b/pywidevine/cdm.py index ade6fe5..0ffd23f 100644 --- a/pywidevine/cdm.py +++ b/pywidevine/cdm.py @@ -473,7 +473,7 @@ class Cdm: output_file: Union[Path, str], temp_dir: Optional[Union[Path, str]] = None, exists_ok: bool = False - ): + ) -> int: """ Decrypt a Widevine-encrypted file using Shaka-packager. Shaka-packager is much more stable than mp4decrypt. @@ -549,7 +549,7 @@ class Cdm: temp_dir.mkdir(parents=True, exist_ok=True) args.extend(["--temp_dir", temp_dir]) - subprocess.check_call([executable, *args]) + return subprocess.check_call([executable, *args]) @staticmethod def encrypt_client_id(