Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Use cache from ansible-compat #65

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ repos:
entry: mypy src/
pass_filenames: false
additional_dependencies:
- ansible-compat>=0.5.0
- molecule
- packaging
- repo: https://github.com/pre-commit/mirrors-pylint
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ setup_requires =

# These are required in actual runtime:
install_requires =
ansible-compat >= 0.5.0
molecule >= 3.4.0
# selinux python module is needed as least by ansible-podman modules
# and allows us of isolated (default) virtualenvs. It does not avoid need
Expand Down
4 changes: 2 additions & 2 deletions src/molecule_podman/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import os
from typing import Dict

from ansible_compat.ports import cache
from molecule import logger, util
from molecule.api import Driver
from molecule.util import lru_cache

log = logger.get_logger(__name__)

Expand Down Expand Up @@ -198,7 +198,7 @@ def ansible_connection_options(self, instance_name):
"ansible_podman_executable": f"{self.podman_exec}",
}

@lru_cache()
@cache
def sanity_checks(self):
"""Implement Podman driver sanity checks."""
log.info("Sanity checks: '{}'".format(self._name))
Expand Down