Skip to content

Commit

Permalink
python-version: Change from match to search
Browse files Browse the repository at this point in the history
  • Loading branch information
markuslf committed Nov 21, 2023
1 parent ff71bb4 commit 1c53854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check-plugins/python-version/python-version
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import lib.version # pylint: disable=C0413
from lib.globals import (STATE_UNKNOWN) # pylint: disable=C0413

__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
__version__ = '2023102701'
__version__ = '2023112101'

DESCRIPTION = 'Tracks if Python is EOL.'

Expand Down Expand Up @@ -113,7 +113,7 @@ def get_installed_version(path):
# Python 3.11.4
version_regex = r'Python (\d+\.\d+\.\d+)'
try:
stdout = re.match(version_regex, stdout)
stdout = re.search(version_regex, stdout)
return stdout.group(1).strip()
except:
return ''
Expand Down

0 comments on commit 1c53854

Please sign in to comment.