mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
configd, python 2 --> 3, simplify search for program path
This commit is contained in:
parent
5335692fb8
commit
dc7db7084b
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user