aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-04-11 01:07:06 +0200
committerMarius Halden <marius.h@lden.org>2015-04-11 01:08:28 +0200
commit1c66a60b2b86776057e3e7a6afcb7e9c05f59516 (patch)
tree11ed65676252baeede7a3247f7dfb5bb61fbc790
parente5d4426f30781167d98068626cd47ddc19866cd1 (diff)
downloademail2push-1c66a60b2b86776057e3e7a6afcb7e9c05f59516.tar.gz
email2push-1c66a60b2b86776057e3e7a6afcb7e9c05f59516.tar.bz2
email2push-1c66a60b2b86776057e3e7a6afcb7e9c05f59516.tar.xz
Open config read-only. " are needed in the aliases file
-rw-r--r--README.md2
-rwxr-xr-xpush.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 25e47c1..e60d901 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Forward emails to pushover based on email sender and recipient address.
## Usage
Add something similar in /etc/aliases
```
-address: |/path/to/push.py /path/to/push.cfg
+address: "|/path/to/push.py /path/to/push.cfg"
```
The path to push.cfg is only needed if it's not in the same diectory as
push.py
diff --git a/push.py b/push.py
index 93bf6d0..2fa1832 100755
--- a/push.py
+++ b/push.py
@@ -13,7 +13,7 @@ try:
except IndexError:
cfg = os.path.dirname(os.path.realpath(__file__)) + '/push.cfg'
-with open(cfg) as fh:
+with open(cfg, 'r') as fh:
maps = yaml.load(fh)
sender_map = maps.get('senders', [])