mirror of https://github.com/devine-dl/devine.git
Handle exceptions in user's Service license funcs
This commit is contained in:
parent
d9471f886f
commit
0bceb772c2
|
@ -658,8 +658,12 @@ class dl:
|
||||||
licence=licence,
|
licence=licence,
|
||||||
certificate=certificate
|
certificate=certificate
|
||||||
)
|
)
|
||||||
except (Widevine.Exceptions.EmptyLicense, Widevine.Exceptions.CEKNotFound) as e:
|
except Exception as e:
|
||||||
cek_tree.add(f"[logging.level.error]{e}")
|
if isinstance(e, (Widevine.Exceptions.EmptyLicense, Widevine.Exceptions.CEKNotFound)):
|
||||||
|
msg = str(e)
|
||||||
|
else:
|
||||||
|
msg = f"An exception occurred in the Service's license function: {e}"
|
||||||
|
cek_tree.add(f"[logging.level.error]{msg}")
|
||||||
if not pre_existing_tree:
|
if not pre_existing_tree:
|
||||||
table.add_row(cek_tree)
|
table.add_row(cek_tree)
|
||||||
raise e
|
raise e
|
||||||
|
|
Loading…
Reference in New Issue