forked from open-webui/open-webui
		
	backend: make dotenv optional
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
		
							parent
							
								
									f079cb6b56
								
							
						
					
					
						commit
						e3503d6617
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -1,4 +1,3 @@ | |||
| from dotenv import load_dotenv, find_dotenv | ||||
| import os | ||||
| 
 | ||||
| 
 | ||||
|  | @ -14,7 +13,11 @@ from constants import ERROR_MESSAGES | |||
| 
 | ||||
| from pathlib import Path | ||||
| 
 | ||||
| load_dotenv(find_dotenv("../.env")) | ||||
| try: | ||||
|     from dotenv import load_dotenv, find_dotenv | ||||
|     load_dotenv(find_dotenv("../.env")) | ||||
| except ImportError: | ||||
|     print("dotenv not installed, skipping...") | ||||
| 
 | ||||
| 
 | ||||
| #################################### | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue