manually run pre-commit

This commit is contained in:
Gareth J. Greenaway 2022-09-30 15:01:11 -07:00
parent 60ccb9f5c0
commit a3e5ba47d4
3 changed files with 3 additions and 16 deletions

View file

@ -19,5 +19,5 @@ roster modules
range
scan
sshconfig
terraform
sshknownhosts
terraform

View file

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Parses roster entries out of Host directives from SSH known_hosts
@ -35,14 +34,10 @@ Or with a Saltfile
"""
from __future__ import absolute_import, print_function, unicode_literals
import logging
# Import python libs
import os
# Import Salt libs
import salt.utils.files
import salt.utils.stringutils
@ -98,10 +93,10 @@ def targets(tgt, tgt_type="glob"):
if not os.path.isfile(ssh_known_hosts_file):
log.error("Cannot find SSH known_hosts file")
raise IOError("Cannot find SSH known_hosts file")
raise OSError("Cannot find SSH known_hosts file")
if not os.access(ssh_known_hosts_file, os.R_OK):
log.error("Cannot access SSH known_hosts file: %s", ssh_known_hosts_file)
raise IOError(
raise OSError(
"Cannot access SSH known_hosts file: {}".format(ssh_known_hosts_file)
)

View file

@ -1,17 +1,9 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
import os
# Import Salt Libs
import salt.config
import salt.loader
import salt.roster.sshknownhosts as sshknownhosts
from tests.support import mixins
# Import Salt Testing Libs
from tests.support.mock import patch
from tests.support.runtests import RUNTIME_VARS
from tests.support.unit import TestCase