From 584316fa13528a72dfa1453ebfacc1c8299e38fe Mon Sep 17 00:00:00 2001 From: Erevoc <188392309+Erevoc@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:13:34 +0200 Subject: [PATCH] Exception Typo --- pyplayready/exceptions.py | 4 ++++ pyplayready/remotecdm.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyplayready/exceptions.py b/pyplayready/exceptions.py index 244aedf..18032a0 100644 --- a/pyplayready/exceptions.py +++ b/pyplayready/exceptions.py @@ -10,5 +10,9 @@ class InvalidSession(PyPlayredyException): """No Session is open with the specified identifier.""" +class InvalidInitData(PyPlayredyException): + """The Playready Cenc Header Data is invalid or empty.""" + + class DeviceMismatch(PyPlayredyException): """The Remote CDMs Device information and the APIs Device information did not match.""" \ No newline at end of file diff --git a/pyplayready/remotecdm.py b/pyplayready/remotecdm.py index d38989a..251a3ee 100644 --- a/pyplayready/remotecdm.py +++ b/pyplayready/remotecdm.py @@ -11,7 +11,7 @@ from pyplayready.bcert import CertificateChain from pyplayready.ecc_key import ECCKey from pyplayready.pssh import PSSH -from pyplayready.exceptions import (DeviceMismatch, ) +from pyplayready.exceptions import (DeviceMismatch, InvalidInitData) class RemoteCdm(Cdm): @@ -104,7 +104,7 @@ class RemoteCdm(Cdm): if not pssh: raise InvalidInitData("A pssh must be provided.") if not isinstance(pssh, str): - raise InvalidInitData(f"Expected pssh to be a {PSSH}, not {pssh!r}") + raise InvalidInitData(f"Expected pssh to be a {str}, not {pssh!r}") r = self.__session.post( url=f"{self.host}/{self.device_name}/get_license_challenge",