summaryrefslogtreecommitdiff
path: root/oi.py
diff options
context:
space:
mode:
authortslil clingman <>2021-07-14 18:27:49 -0400
committertslil clingman <>2021-07-14 18:27:49 -0400
commit7ccd2d5b3d14b528e9d497e7937c31215568d338 (patch)
treeb4dcf905df327f4f70be6c14567d9edbbcb7bb7c /oi.py
parent5b4fb66bebc154a8fd121edae6b2e44ee71566bd (diff)
Add method to use pass
Diffstat (limited to 'oi.py')
-rwxr-xr-xoi.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/oi.py b/oi.py
index eb51c83..64dce16 100755
--- a/oi.py
+++ b/oi.py
@@ -1,8 +1,12 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Support offlineimap by retrieving login credentials and doing nametrans
import re, os
+from subprocess import check_output
+
+def get_pass_pass(account):
+ return check_output("pass " + account, shell=True).splitlines()[0]
def get_authinfo_password(machine, login, port):
s = "machine %s login %s password ([^ ]*) port %s" % (machine, login, port)