introduce EasyRSA._

This commit is contained in:
Jörn-Michael Miehe 2022-04-05 01:53:13 +00:00
parent f2948a7b64
commit d89409f973

View file

@ -4,6 +4,7 @@ Python interface to EasyRSA CA.
from __future__ import annotations
import functools
import subprocess
from enum import Enum, auto
from pathlib import Path
@ -139,6 +140,20 @@ class EasyRSA:
None: {},
}
@classmethod
@functools.lru_cache
def _load(cls) -> EasyRSA:
return cls()
@classmethod
@property
def _(cls) -> EasyRSA:
"""
Get the singleton
"""
return cls._load()
@property
def output_directory(self) -> Path:
"""