Adding the directory containing 'config.py' in to the sys.path variable,

so that - when config.py refered from outside the pgAdmin itself (i.e.
during building the pip).
This commit is contained in:
Ashesh Vashi 2017-03-07 17:10:31 +05:30
parent 1f9fd507b0
commit 41e0a73ea6

View File

@ -12,6 +12,15 @@
##########################################################################
import os
import sys
# We need to include the root directory in sys.path to ensure that we can
# find everything we need when running in the standalone runtime.
root = os.path.dirname(os.path.realpath(__file__))
if sys.path[0] != root:
sys.path.insert(0, root)
from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path
##########################################################################