Fix migrate cmd's error handling, missing ValueError catching
This commit is contained in:
parent
93f70f73c2
commit
fe21bfe88c
|
@ -248,7 +248,7 @@ def migrate(ctx: click.Context, device: Path) -> None:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
new_device = Device.migrate(device.read_bytes())
|
new_device = Device.migrate(device.read_bytes())
|
||||||
except ConstructError as e:
|
except (ConstructError, ValueError) as e:
|
||||||
raise click.UsageError(str(e), ctx)
|
raise click.UsageError(str(e), ctx)
|
||||||
|
|
||||||
# save
|
# save
|
||||||
|
|
Loading…
Reference in New Issue