fix env_path refactoring
This commit is contained in:
parent
d7b75bd652
commit
66111e5ad8
1 changed files with 3 additions and 3 deletions
|
@ -2,14 +2,14 @@ from subprocess import check_output, call
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def gopass_credential_from_env_path (env):
|
def gopass_credential_from_env_path (env_var):
|
||||||
env_path = os.environ.get(env, None)
|
env_path = os.environ.get(env_var, None)
|
||||||
return gopass_credential_from_path(env_path)
|
return gopass_credential_from_path(env_path)
|
||||||
|
|
||||||
def gopass_credential_from_path (path):
|
def gopass_credential_from_path (path):
|
||||||
credential = None
|
credential = None
|
||||||
|
|
||||||
if env_path:
|
if path:
|
||||||
print('get credential for: ' + path)
|
print('get credential for: ' + path)
|
||||||
if sys.version_info.major == 3:
|
if sys.version_info.major == 3:
|
||||||
credential = check_output(['gopass', path], encoding='UTF-8')
|
credential = check_output(['gopass', path], encoding='UTF-8')
|
||||||
|
|
Loading…
Reference in a new issue