From 5c436fb7a61d7350b7dae080127b6323fa1d2412 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Thu, 7 Jul 2016 13:34:32 +0200 Subject: [PATCH] Load CONFIG file from same directory as script. --- packtclaim.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packtclaim.py b/packtclaim.py index 9aafc49..ae401dd 100755 --- a/packtclaim.py +++ b/packtclaim.py @@ -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()