fix use pyinstaller  package,  it will be wrong
This commit is contained in:
CatSlave007 2021-01-28 11:12:49 +08:00 committed by Benedek Racz
parent d2cf84a9a9
commit b0d4abdd44

View File

@ -357,7 +357,7 @@ class SpawnBase:
wexpect_executable = os.environ['WEXPECT_EXECUTABLE'] wexpect_executable = os.environ['WEXPECT_EXECUTABLE']
except KeyError: except KeyError:
dirname = os.path.dirname(sys.executable) dirname = os.path.dirname(sys.executable)
wexpect_executable = os.path.join(dirname, '..', 'wexpect', 'wexpect.exe') wexpect_executable = os.path.abspath(os.path.join(dirname, '..', 'wexpect', 'wexpect.exe'))
if not os.path.exists(wexpect_executable): if not os.path.exists(wexpect_executable):
logger.error(f'ExceptionPexpect: Wexpect executable: >>{wexpect_executable}<< not found.') logger.error(f'ExceptionPexpect: Wexpect executable: >>{wexpect_executable}<< not found.')