From 97ab3ddca07ce9232a4671f1306e66978df90136 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Mon, 13 May 2019 21:33:25 +0200 Subject: [PATCH] chg: [yara export] fix the correct Python version is used --- app/Lib/Export/YaraExport.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Lib/Export/YaraExport.php b/app/Lib/Export/YaraExport.php index 6ba0e07b4..91dd813d1 100644 --- a/app/Lib/Export/YaraExport.php +++ b/app/Lib/Export/YaraExport.php @@ -129,7 +129,8 @@ class YaraExport $out2 = $this->__yara_file_asis->path; $logging = $this->__end_of_cmd; $raw_flag = $this->__raw_mode ? '--raw' : ''; - $result = shell_exec($this->getPythonVersion() . " $pythonScript --input $in --out-generated $out1 --out-asis $out2 $raw_flag $logging"); + $my_server = ClassRegistry::init('Server'); + $result = shell_exec($my_server->getPythonVersion() . " $pythonScript --input $in --out-generated $out1 --out-asis $out2 $raw_flag $logging"); $this->__curr_input_file->close(); $this->__curr_input_file->delete(); $this->__n_attributes = 0;