fix: black
This commit is contained in:
parent
399bbf49d1
commit
54d8261137
2 changed files with 6 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
from pathlib import Path
|
||||
from ansible.parsing.vault import VaultLib, PromptVaultSecret
|
||||
|
||||
try:
|
||||
from ansible.module_utils.common.text.converters import to_bytes
|
||||
except ModuleNotFoundError:
|
||||
|
|
@ -31,8 +32,8 @@ from .__version__ import __version__
|
|||
|
||||
|
||||
class RougailUserDataAnsible(RougailUserDataYaml):
|
||||
"""Load Ansible data from encrypted file
|
||||
"""
|
||||
"""Load Ansible data from encrypted file"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
config,
|
||||
|
|
@ -42,6 +43,7 @@ class RougailUserDataAnsible(RougailUserDataYaml):
|
|||
) -> None:
|
||||
if rougailconfig is None:
|
||||
from rougail import RougailConfig
|
||||
|
||||
rougailconfig = RougailConfig
|
||||
user_data = rougailconfig["step.user_data"]
|
||||
if "ansible" not in user_data:
|
||||
|
|
@ -60,8 +62,7 @@ class RougailUserDataAnsible(RougailUserDataYaml):
|
|||
self.source = _('the Ansible file "{0}"')
|
||||
|
||||
def open(self, filename: str) -> dict:
|
||||
"""Open file
|
||||
"""
|
||||
"""Open file"""
|
||||
prompt = PromptVaultSecret(
|
||||
to_bytes(self.secret), "default", ["Vault password: "]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ details.
|
|||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from .i18n import _
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue