Cdm: Return a DecodeError in set_service_certificate
This is to match with the doc-string stating it returns a DecodeError on failure.
This commit is contained in:
parent
2bb5c9e0b5
commit
909e83c199
|
@ -112,8 +112,8 @@ class Cdm:
|
|||
signed_message = SignedMessage()
|
||||
try:
|
||||
signed_message.ParseFromString(certificate)
|
||||
except DecodeError:
|
||||
raise ValueError("Could not parse certificate as a Signed Message.")
|
||||
except DecodeError as e:
|
||||
raise DecodeError(f"Could not parse certificate as a Signed Message: {e}")
|
||||
|
||||
self.service_certificate = signed_message
|
||||
return signed_message
|
||||
|
|
Loading…
Reference in New Issue