From fe21bfe88c1508cde6e861d53f64c9ec6ac0a3d8 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Thu, 21 Jul 2022 16:20:22 +0100 Subject: [PATCH] Fix migrate cmd's error handling, missing ValueError catching --- pywidevine/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywidevine/main.py b/pywidevine/main.py index 04cd12e..b2564d6 100644 --- a/pywidevine/main.py +++ b/pywidevine/main.py @@ -248,7 +248,7 @@ def migrate(ctx: click.Context, device: Path) -> None: try: new_device = Device.migrate(device.read_bytes()) - except ConstructError as e: + except (ConstructError, ValueError) as e: raise click.UsageError(str(e), ctx) # save