From 25869427afed90745b6b65cc6072c24caa2d8373 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sun, 29 Apr 2018 01:23:20 -0400 Subject: [rc/{notmuch,offlineimap}] migrate to new literate setup --- offlineimap/.offlineimap.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 offlineimap/.offlineimap.py (limited to 'offlineimap/.offlineimap.py') diff --git a/offlineimap/.offlineimap.py b/offlineimap/.offlineimap.py deleted file mode 100644 index 3b89349..0000000 --- a/offlineimap/.offlineimap.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -import subprocess - -def mailpasswd(acct): - acct = os.path.basename(acct) - path = "/home/amin/.passwd/%s.gpg" % acct - args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path] - try: - return subprocess.check_output(args).strip() - except subprocess.CalledProcessError: - return "" - -def mailuser(acct): - acct = os.path.basename(acct) - path = "/home/amin/.passwd/%s" % acct - args = ["cat", path] - try: - return subprocess.check_output(args).strip() - except subprocess.CalledProcessError: - return "" - -def prime_gpg_agent(): - ret = False - i = 1 - while not ret: - ret = (mailpasswd("prime") == "prime") - if i > 2: - from offlineimap.ui import getglobalui - sys.stderr.write("Error reading in passwords. Terminating.\n") - getglobalui().terminate() - i += 1 - return ret - -prime_gpg_agent() -- cgit v1.2.3-83-g751a