pycucks btfo

This commit is contained in:
Luke Smith 2019-04-11 23:19:53 -04:00
parent f796821828
commit 53ea8511b7
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

View File

@ -1,16 +0,0 @@
import os.path
import subprocess
import distutils.spawn
home = os.path.expanduser("~")
def mailpasswd(acct):
acct = os.path.basename(acct)
path = "%s/.local/share/muttwizard/%s.gpg" % (home,acct)
if distutils.spawn.find_executable("gpg"):
GPG="gpg"
else:
GPG="gpg2"
args = [GPG, "--use-agent", "--quiet", "--batch", "-d", path]
try:
return subprocess.check_output(args).strip().decode('UTF-8')
except subprocess.CalledProcessError:
return ""