mirror of
				https://github.com/devine-dl/pywidevine.git
				synced 2025-11-04 03:44:50 +00:00 
			
		
		
		
	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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user