From 1c66a60b2b86776057e3e7a6afcb7e9c05f59516 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Sat, 11 Apr 2015 01:07:06 +0200 Subject: Open config read-only. " are needed in the aliases file --- README.md | 2 +- push.py | 2 +- 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', []) -- cgit v1.2.3