Config now expected next to geoffrey.py and console logging fixed.

doc_update
Joey Hines 2018-08-23 14:44:28 -05:00
parent 330fa16970
commit 0e8101d64c
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import codecs import codecs
import configparser import configparser
import os
def create_config(config): def create_config(config):
@ -30,7 +31,8 @@ def create_config(config):
def read_config(): def read_config():
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read_file(codecs.open("GeoffreyConfig.ini", "r", "utf8")) path = os.path.dirname(os.path.abspath(__file__))
config.read_file(codecs.open("{}/GeoffreyConfig.ini".format(path), "r", "utf8"))
if len(config.sections()) == 0: if len(config.sections()) == 0:
create_config(config) create_config(config)