configd, python 2 --> 3, simplify search for program path

This commit is contained in:
Ad Schellevis 2019-02-25 10:13:30 +01:00
parent 5335692fb8
commit dc7db7084b

View File

@ -45,10 +45,7 @@ from modules.daemonize import Daemonize
import cProfile
# find program path
if len(__file__.split('/')[:-1]) > 0:
program_path = '/'.join(__file__.split('/')[:-1])
else:
program_path = os.getcwd()
program_path = os.path.dirname(os.path.abspath(__file__))
# set working directory to program_path
sys.path.append(program_path)