diff --git a/pywidevine/serve.py b/pywidevine/serve.py index 53f324e..bf2bf65 100644 --- a/pywidevine/serve.py +++ b/pywidevine/serve.py @@ -29,6 +29,9 @@ async def _startup(app: web.Application): for x in app["config"]["devices"] for path in [Path(x)] } + for device in app["config"]["devices"].values(): + if not device.is_file(): + raise FileNotFoundError(f"Device file does not exist: {device}") async def _cleanup(app: web.Application):