Fixing offline imap password stuff

This commit is contained in:
Dustin Swan
2013-03-22 21:42:58 -05:00
parent f3841a66bb
commit e4b21e989d
2 changed files with 6 additions and 4 deletions

View File

@@ -1,7 +1,9 @@
import subprocess
def gmail_password(): def gmail_password():
path = "~/.gmail_password.pgp" path = "/Users/dustinswan/.gmail_password.gpg"
args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path] args = ["gpg", "-d", path]
try: try:
return subprocess.check_output(args) return subprocess.check_output(args).rstrip()
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
return "".strip() return "".strip()

View File

@@ -23,7 +23,7 @@ nametrans = lambda folder: {'drafts': '[Gmail]/Drafts',
maxconnections = 1 maxconnections = 1
type = Gmail type = Gmail
remoteuser = dustinswan@gmail.com remoteuser = dustinswan@gmail.com
remetepasseval = gmail_password() remotepasseval = gmail_password()
realdelete = no realdelete = no
nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts', nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts',
'[Gmail]/Sent Mail': 'sent', '[Gmail]/Sent Mail': 'sent',