mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 17:20:19 +00:00
Fix lint issues
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
3f27139531
commit
b0df08334c
2 changed files with 7 additions and 3 deletions
|
@ -1299,7 +1299,7 @@ repos:
|
|||
- id: nox
|
||||
alias: lint-salt
|
||||
name: Lint Salt
|
||||
files: ^((setup|noxfile)|(salt|tasks)/.*)\.py$
|
||||
files: ^((setup|noxfile)|(salt|tasks|tools)/.*)\.py$
|
||||
exclude: >
|
||||
(?x)^(
|
||||
templates/.*|
|
||||
|
|
|
@ -45,8 +45,11 @@ except ImportError:
|
|||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=no-name-in-module
|
||||
from boto3.resources.factory.ec2 import Instance
|
||||
|
||||
# pylint: enable=no-name-in-module
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
REPO_ROOT = pathlib.Path(__file__).parent.parent
|
||||
|
@ -891,7 +894,7 @@ class VM:
|
|||
description=f"SSH connection to {host} available!",
|
||||
completed=ssh_connection_timeout,
|
||||
)
|
||||
return True
|
||||
break
|
||||
proc.wait(timeout=3)
|
||||
stderr = proc.stderr.read().strip()
|
||||
if stderr:
|
||||
|
@ -921,6 +924,7 @@ class VM:
|
|||
if last_error:
|
||||
error += f". {last_error}"
|
||||
return error
|
||||
return True
|
||||
|
||||
def destroy(self):
|
||||
try:
|
||||
|
@ -1206,7 +1210,7 @@ class VM:
|
|||
pseudo_terminal: bool = False,
|
||||
env: list[str] = None,
|
||||
log_command_level: int = logging.INFO,
|
||||
ssh_options: list[str] | None = None,
|
||||
ssh_options: list[str] | None = None, # pylint: disable=bad-whitespace
|
||||
) -> list[str]:
|
||||
ssh = shutil.which("ssh")
|
||||
if TYPE_CHECKING:
|
||||
|
|
Loading…
Add table
Reference in a new issue