Skip to content

Commit 5d05053

Browse files
author
Thierry RAMORASOAVINA
committed
Fix the khiops version initialization independently of the OS
It should always work despite noise (drivers logs, debug info)
1 parent 583ef07 commit 5d05053

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

khiops/core/internals/runner.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,10 @@ def _initialize_khiops_version(self):
949949

950950
# On success parse and save the version
951951
if return_code == 0:
952-
# Skip potential non-version lines (ex: Completed loading of file driver...)
953-
for line in stdout.split(os.linesep):
952+
# Skip potential non-version lines
953+
# (ex: Completed loading of file driver, debug info ...)
954+
for line in stdout.split("\n"):
955+
line = line.strip("\r") # remove Windows-specific Carriage-Return
954956
if line.startswith("Khiops"):
955957
khiops_version_str = line.rstrip().split(" ")[1]
956958
break

0 commit comments

Comments
 (0)