Various dotfile changes
parent
6cbf0294b7
commit
763a6a5f23
@ -1,11 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import gnupg
|
from subprocess import check_output
|
||||||
|
|
||||||
home = os.environ['HOME']
|
home = os.environ['HOME']
|
||||||
gpg = gnupg.GPG(gnupghome=home+"/.gnupg", use_agent=True)
|
|
||||||
|
|
||||||
def decrypt_password(file):
|
def decrypt_password(file):
|
||||||
path = home + "/" + file
|
path = home + "/" + file
|
||||||
f = open(path, 'rb')
|
res = check_output(["gpg", "-dq", path])
|
||||||
decrypted = gpg.decrypt_file(f)
|
return res.strip()
|
||||||
return decrypted.data.strip()
|
|
||||||
|
Loading…
Reference in New Issue