get_artist_art/prog_conf.py
efrick 811979cea7 Move configparser code to seperate module
This code is now in its own Class. This is to make it easier to do reporting and updating.
2024-10-16 11:20:14 -04:00

17 lines
433 B
Python

import configparser
from os.path import exists,join,expanduser
class gaa_conf:
def __init__(self):
self.conf = configparser.ConfigParser()
if (exists('config.ini')):
self.conf_path = 'config.ini'
else:
self.conf_path = join(expanduser(
"~"), ".local/share/get_artist_art/config.ini")
self.conf.read(self.conf_path)
def get():
return gaa_conf