blob: 6b2c466041be59343f1b8429bf3100630c6df6f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env python
import os
import subprocess
def mailpasswd(acct):
acct = os.path.basename(acct)
path = "/home/urbain/.password-store/Mail/%s.gpg" % acct
args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
try:
return subprocess.check_output(args).strip()
except subprocess.CalledProcessError:
return ""
|