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()
|
signed_message = SignedMessage()
|
||||||
try:
|
try:
|
||||||
signed_message.ParseFromString(certificate)
|
signed_message.ParseFromString(certificate)
|
||||||
except DecodeError:
|
except DecodeError as e:
|
||||||
raise ValueError("Could not parse certificate as a Signed Message.")
|
raise DecodeError(f"Could not parse certificate as a Signed Message: {e}")
|
||||||
|
|
||||||
self.service_certificate = signed_message
|
self.service_certificate = signed_message
|
||||||
return signed_message
|
return signed_message
|
||||||
|
|
Loading…
Reference in New Issue