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

Commit

Permalink
Use cache from ansible-compat (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Aug 26, 2021
1 parent f42f273 commit b03084e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit b03084e

Please sign in to comment.