Fix lint issues

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-01-17 04:40:14 +00:00 committed by Pedro Algarvio
parent 3f27139531
commit b0df08334c
2 changed files with 7 additions and 3 deletions

View file

@ -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/.*|

View file

@ -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: