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