mirror of
				https://github.com/KevinMidboe/transatlanticTorrentExpress.git
				synced 2025-10-29 18:00:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			466 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			466 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #!/bin/usr/python3
 | |
| import os
 | |
| from configparser import ConfigParser
 | |
| 
 | |
| def getConfig():
 | |
|   # logger.debug('Reading config')
 | |
|   pwd = os.path.dirname(os.path.abspath(__file__))
 | |
|   path = os.path.join(pwd, 'config.ini')
 | |
| 
 | |
|   if not os.path.isfile(path):
 | |
|     print('Please fill out and rename config file. Check README for more info.')
 | |
|     exit(0)
 | |
| 
 | |
|   config = ConfigParser()
 | |
|   config.read(path)
 | |
| 
 | |
|   # logger.debug('Sections parsed: {}'.format(config.sections()))
 | |
|   return config |