mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Pylint fixes
This commit is contained in:
parent
47bfba1018
commit
31878d5aaf
1 changed files with 2 additions and 3 deletions
|
@ -7,8 +7,8 @@ This module provides common functionality for icinga2 module and state.
|
|||
|
||||
.. versionadded:: 2018.8.3
|
||||
'''
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
import logging
|
||||
import re
|
||||
|
||||
|
@ -20,10 +20,9 @@ log = logging.getLogger(__name__)
|
|||
|
||||
def get_certs_path():
|
||||
icinga2_output = __salt__['cmd.run_all']([salt.utils.path.which('icinga2'), "--version"], python_shell=False)
|
||||
version = re.search('r\d+\.\d+', icinga2_output['stdout']).group(0)
|
||||
version = re.search(r'r\d+\.\d+', icinga2_output['stdout']).group(0)
|
||||
# Return new certs path for icinga2 >= 2.8
|
||||
if int(version.split('.')[1]) >= 8:
|
||||
return '/var/lib/icinga2/certs/'
|
||||
# Keep backwords compatibility with older icinga2
|
||||
return '/etc/icinga2/pki/'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue