20 lines
517 B
Python
20 lines
517 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
|
|
def set_conf(self, conf_path):
|
|
self.read(conf_path)
|
|
return self
|