Various dotfile changes
parent
6cbf0294b7
commit
763a6a5f23
@ -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