Merge branch 'master' of github.com:dustinswan/dotfiles
commit
2df05fe854
@ -1,11 +1,9 @@
|
||||
import os
|
||||
import gnupg
|
||||
from subprocess import check_output
|
||||
|
||||
home = os.environ['HOME']
|
||||
gpg = gnupg.GPG(gnupghome=home+"/.gnupg", use_agent=True)
|
||||
|
||||
def decrypt_password(file):
|
||||
path = home + "/" + file
|
||||
f = open(path, 'rb')
|
||||
decrypted = gpg.decrypt_file(f)
|
||||
return decrypted.data.strip()
|
||||
res = check_output(["gpg", "-dq", path])
|
||||
return res.strip()
|
||||
|
Loading…
Reference in New Issue