mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
@@ -63,7 +63,7 @@ class Python extends BaseValidation
|
|||||||
|
|
||||||
private function checkPipVersion(Validator $validator, $version)
|
private function checkPipVersion(Validator $validator, $version)
|
||||||
{
|
{
|
||||||
preg_match('/\(python ([0-9.]+)\)/', `pip3 --version`, $matches);
|
preg_match('/\(python ([0-9.]+)\)/', `pip3 --version 2>/dev/null`, $matches);
|
||||||
$pip = $matches[1];
|
$pip = $matches[1];
|
||||||
$python = implode('.', array_slice(explode('.', $version), 0, 2));
|
$python = implode('.', array_slice(explode('.', $version), 0, 2));
|
||||||
if ($pip && version_compare($python, $pip, '!=')) {
|
if ($pip && version_compare($python, $pip, '!=')) {
|
||||||
|
Reference in New Issue
Block a user