Skip to content

Commit 959be6c

Browse files
committed
Fix #53
1 parent a7f1cc2 commit 959be6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Service/UtilsService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ public function __construct(IConfig $config, SettingMapper $settingMapper,
6363
$this->config = $config;
6464
$this->settingMapper = $settingMapper;
6565
$this->appManager = $appManager;
66-
/** @var Setting */
67-
$pythonCommandSetting = $this->settingMapper->findByName('python_command');
68-
$this->pythonCommand = $pythonCommandSetting->getValue();
6966
$this->databaseStatistics = $databaseStatistics;
7067
$this->logger = $logger;
7168
}
@@ -150,6 +147,9 @@ public function isFunctionEnabled($function_name) {
150147
}
151148

152149
public function getPythonVersion(): array {
150+
/** @var Setting */
151+
$pythonCommandSetting = $this->settingMapper->findByName('python_command');
152+
$this->pythonCommand = $pythonCommandSetting->getValue();
153153
exec($this->pythonCommand . ' --version', $output, $result_code);
154154
if ($result_code === 0 && isset($output[0]) && preg_match_all("/\d{1}\.\d{1,2}(\.\d{1,2}){0,1}/s", $output[0], $matches)) {
155155
return isset($matches[0][0]) ?

0 commit comments

Comments
 (0)