__file__ already is absolute

This commit is contained in:
ander 2020-10-16 14:11:00 +03:00
parent 1614b62f70
commit 174aa77280

View file

@ -31,7 +31,7 @@ import sys
try:
import cdist
except ModuleNotFoundError:
cdist_bin = os.path.abspath(__file__)
cdist_bin = __file__
if os.path.islink(cdist_bin):
cdist_bin = os.readlink(cdist_bin)
cdist_dir = os.path.abspath(os.path.join(os.path.dirname(cdist_bin), os.pardir))