mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 10:10:19 -06:00
1) Correct the typo 'pythonw.exe' should be 'python.exe' for Windows if 'pythonw.exe' not found.
2) Added logging to identify the interpreter command for Windows.
This commit is contained in:
parent
eb971a0320
commit
ac4b5ab7fa
@ -234,6 +234,11 @@ class BatchProcess(object):
|
||||
paths = os.environ['PATH'].split(os.pathsep)
|
||||
interpreter = None
|
||||
|
||||
current_app.logger.info(
|
||||
u"Process Executor: Operating System Path %s",
|
||||
str(paths)
|
||||
)
|
||||
|
||||
if os.name == 'nt':
|
||||
paths.insert(0, os.path.join(u(sys.prefix), u'Scripts'))
|
||||
paths.insert(0, u(sys.prefix))
|
||||
@ -242,6 +247,10 @@ class BatchProcess(object):
|
||||
if interpreter is None:
|
||||
interpreter = which(u'python.exe', paths)
|
||||
|
||||
current_app.logger.info(
|
||||
u"Process Executor: Interpreter value in path: %s",
|
||||
str(interpreter)
|
||||
)
|
||||
if interpreter is None and current_app.PGADMIN_RUNTIME:
|
||||
# We've faced an issue with Windows 2008 R2 (x86) regarding,
|
||||
# not honouring the environment variables set under the Qt
|
||||
@ -262,7 +271,12 @@ class BatchProcess(object):
|
||||
|
||||
interpreter = which(u'pythonw.exe', [venv])
|
||||
if interpreter is None:
|
||||
interpreter = which(u'pythonw.exe', [venv])
|
||||
interpreter = which(u'python.exe', [venv])
|
||||
|
||||
current_app.logger.info(
|
||||
u"Process Executor: Interpreter value in virtual "
|
||||
u"environment: %s", str(interpreter)
|
||||
)
|
||||
|
||||
if interpreter is not None:
|
||||
# Our assumptions are proven right.
|
||||
|
Loading…
Reference in New Issue
Block a user