From 362510de687cfb3c872937019440000e0811c1f0 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Mon, 5 Sep 2022 12:55:06 +0100 Subject: [PATCH] Device: Re-raise DecodeErrors within some DecodeError handlers --- pywidevine/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywidevine/device.py b/pywidevine/device.py index 6a02cbd..e238514 100644 --- a/pywidevine/device.py +++ b/pywidevine/device.py @@ -113,7 +113,7 @@ class Device: if self.client_id.SerializeToString() != client_id: raise DecodeError("partial parse") except DecodeError as e: - raise ValueError(f"Failed to parse client_id as a ClientIdentification, {e}") + raise DecodeError(f"Failed to parse client_id as a ClientIdentification, {e}") self.vmp = FileHashes() if self.client_id.vmp_data: @@ -122,7 +122,7 @@ class Device: if self.vmp.SerializeToString() != self.client_id.vmp_data: raise DecodeError("partial parse") except DecodeError as e: - raise ValueError(f"Failed to parse Client ID's VMP data as a FileHashes, {e}") + raise DecodeError(f"Failed to parse Client ID's VMP data as a FileHashes, {e}") signed_drm_certificate = SignedDrmCertificate() drm_certificate = DrmCertificate()