From 050e62aa49b341ee3f962363bbbbfbe6b694a6d9 Mon Sep 17 00:00:00 2001 From: jem Date: Tue, 28 Jan 2020 11:47:21 +0100 Subject: [PATCH] add direct gopass adapter --- src/main/python/ddadevops/credential.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/python/ddadevops/credential.py b/src/main/python/ddadevops/credential.py index 847a23e..241c1c1 100644 --- a/src/main/python/ddadevops/credential.py +++ b/src/main/python/ddadevops/credential.py @@ -2,8 +2,11 @@ from subprocess import check_output, call import os import sys -def gopass_credential_from_env_path (env_path): - env_path = os.environ.get(env_path, None) +def gopass_credential_from_env_path (env): + env_path = os.environ.get(env, None) + return gopass_credential_from_path(env_path) + +def gopass_credential_from_path (path): credential = None if env_path: @@ -14,3 +17,4 @@ def gopass_credential_from_env_path (env_path): credential = check_output(['gopass', env_path]) return credential +