fixed linter errors

This commit is contained in:
Tyler Johnson 2019-10-02 20:27:39 -06:00 committed by Bryce Larson
parent 2a9202eff0
commit a6816addd5
No known key found for this signature in database
GPG Key ID: 131C38B0F02DB4CA

View File

@ -28,13 +28,14 @@ import salt.utils.platform
# Import 3rd-party libs
from salt.ext import six
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
try:
from distro import LinuxDistribution
pre_grains = LinuxDistribution()
except ImportError:
pre_grains = None
log = logging.getLogger(__name__)
_PKG_EPOCH_TARGETS = []
@ -68,7 +69,7 @@ elif pre_grains:
_PKG_DOT_TARGETS = ['tomcat6-el-2.1-api']
elif pre_grains.major_version() == 7:
_PKG_DOT_TARGETS = ['tomcat-el-2.2-api']
_PKG_EPOCH_TARGETS = [ 'comps-extras']
_PKG_EPOCH_TARGETS = ['comps-extras']
elif pre_grains.id() in ('sles', 'opensuse'):
_PKG_TARGETS = ['figlet', 'htop']
_PKG_CAP_TARGETS = [('perl(ZNC)', 'znc-perl')]
@ -85,7 +86,9 @@ def runs_on(platforms=None, os_like=None, reason=''):
if not any(x in pre_grains.like() for x in os_like):
cls.skipTest(reason if reason else 'OS not similar to [{}]'.format(', '.join(os_like)))
return caller(cls)
return wrapper
return decorator