mirror of
				https://github.com/k4yt3x/video2x.git
				synced 2025-11-04 06:31:00 +01:00 
			
		
		
		
	Adding check for valid output path
This commit is contained in:
		
							parent
							
								
									8eeba71ece
								
							
						
					
					
						commit
						22f656b800
					
				@ -587,6 +587,11 @@ def main() -> int:
 | 
				
			|||||||
            logger.critical("Input path is not a file")
 | 
					            logger.critical("Input path is not a file")
 | 
				
			||||||
            return 1
 | 
					            return 1
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
 | 
					        # Output file won't exist yet, but the parent directory should.
 | 
				
			||||||
 | 
					        if not args.output.parent.exists():
 | 
				
			||||||
 | 
					            logger.critical(f"Output directory does not exist: {args.output}")
 | 
				
			||||||
 | 
					            return 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # set logger level
 | 
					        # set logger level
 | 
				
			||||||
        if os.environ.get("LOGURU_LEVEL") is None:
 | 
					        if os.environ.get("LOGURU_LEVEL") is None:
 | 
				
			||||||
            os.environ["LOGURU_LEVEL"] = args.loglevel.upper()
 | 
					            os.environ["LOGURU_LEVEL"] = args.loglevel.upper()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user