chg: [yara export] fix the correct Python version is used

pull/4627/head
Alexandre Dulaunoy 2019-05-13 21:33:25 +02:00
parent baeb350a3c
commit 97ab3ddca0
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 2 additions and 1 deletions

View File

@ -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;