Load CONFIG file from same directory as script.

This commit is contained in:
Markus Birth 2016-07-07 13:34:32 +02:00
parent 3b3fd424eb
commit 5c436fb7a6

View File

@ -5,10 +5,11 @@
import configparser
import logging
import sys
from grab import Grab
from io import StringIO
config_str = '[DEFAULT]\n' + open('CONFIG', 'r').read()
config_str = '[DEFAULT]\n' + open(sys.path[0] + '/CONFIG', 'r').read()
config_fp = StringIO(config_str)
c = configparser.RawConfigParser()