serve: Add check that all devices in config exist
This commit is contained in:
parent
2ba13f5e07
commit
4f96ee402b
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue