mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
manually run pre-commit
This commit is contained in:
parent
60ccb9f5c0
commit
a3e5ba47d4
3 changed files with 3 additions and 16 deletions
|
@ -19,5 +19,5 @@ roster modules
|
|||
range
|
||||
scan
|
||||
sshconfig
|
||||
terraform
|
||||
sshknownhosts
|
||||
terraform
|
||||
|
|
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue