Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 332 Bytes
import os, subprocess
def decrypt_password(account):
fpath = '%s/.mail-accounts/%s/password.gpg' % \
(os.environ['HOME'], account,)
args = ["gpg", "--quiet", "--batch", "--decrypt", fpath]
return subprocess.check_output(args).strip()
except subprocess.CalledProcessError:
return ""
You can’t perform that action at this time.