You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 6 години
преди 6 години
преди 6 години
1234567891011
  1. import os.path
  2. import subprocess
  3. home = os.path.expanduser("~")
  4. def mailpasswd(acct):
  5. acct = os.path.basename(acct)
  6. path = "%s/.config/mutt/credentials/%s.gpg" % (home,acct)
  7. args = ["gpg2", "--use-agent", "--quiet", "--batch", "-d", path]
  8. try:
  9. return subprocess.check_output(args).strip()
  10. except subprocess.CalledProcessError:
  11. return ""