Skip to content

Commit f975512

Browse files
committed
There is no point in setting the Delphi executable as ProgramName.
1 parent 7adb47e commit f975512

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Source/PythonEngine.pas

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4216,12 +4216,8 @@ procedure TPythonEngine.Initialize;
42164216

42174217
gPythonEngine := Self;
42184218
CheckRegistry;
4219-
if Assigned(Py_SetProgramName) then
4220-
begin
4221-
if ProgramName = '' then
4222-
ProgramName := UnicodeString(ParamStr(0));
4219+
if Assigned(Py_SetProgramName) and (ProgramName <> '') then
42234220
Py_SetProgramName(PWCharT(FProgramName));
4224-
end;
42254221
AssignPyFlags;
42264222
if Length(FPythonHome) > 0 then
42274223
Py_SetPythonHome(PWCharT(FPythonHome));

0 commit comments

Comments
 (0)