Skip to content

Commit

Permalink
check for PythonOk
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Mar 20, 2017
1 parent 0576305 commit a073ccd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/formmain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2302,9 +2302,10 @@ procedure TfmMain.InitPyEngine;
PythonEngine.DllName:= ExtractFileName(UiOps.PyLibrary);
PythonEngine.LoadDll;

try
GetPythonEngine.ExecString('import sys');
except
if PythonOK then
GetPythonEngine.ExecString('import sys')
else
begin
FConsoleMustShow:= true;
fmConsole.DoLogConsoleLine(msgCannotInitPython1);
fmConsole.DoLogConsoleLine(msgCannotInitPython2);
Expand Down

0 comments on commit a073ccd

Please sign in to comment.