dotfiles

Configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | Submodules | README | LICENSE

offlineimap-password-store.py (378B)


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