forked from axiom-team/jaklis
Use absolute anr real path for .env
This commit is contained in:
parent
ed16b0b66d
commit
9c406c5476
|
@ -10,10 +10,12 @@ from lib.likes import ReadLikes, SendLikes, UnLikes
|
||||||
|
|
||||||
VERSION = "0.0.1"
|
VERSION = "0.0.1"
|
||||||
|
|
||||||
|
MY_PATH = os.path.realpath(os.path.dirname(sys.argv[0])) + '/'
|
||||||
|
|
||||||
# Get variables environment
|
# Get variables environment
|
||||||
if not os.path.isfile('.env'):
|
if not os.path.isfile(MY_PATH + '.env'):
|
||||||
copyfile(".env.template", ".env")
|
copyfile(MY_PATH + ".env.template",MY_PATH + ".env")
|
||||||
dotenv_path = join(dirname(__file__), '.env')
|
dotenv_path = join(dirname(__file__),MY_PATH + '.env')
|
||||||
load_dotenv(dotenv_path)
|
load_dotenv(dotenv_path)
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
|
|
Loading…
Reference in New Issue