- Update r2e wrapper script. - Patch config.py loader (now first look in current dir like upstream, but if not found look for $HOME/.rss2email/config.py). - Include config.py.example also in the documentation directory. - Various minor spec file adjustments.
22 lines
599 B
Diff
22 lines
599 B
Diff
diff -Nur rss2email-2.70-orig/rss2email.py rss2email-2.70/rss2email.py
|
|
--- rss2email-2.70-orig/rss2email.py 2010-12-17 19:29:34.000000000 +0100
|
|
+++ rss2email-2.70/rss2email.py 2011-01-12 18:57:25.775331913 +0100
|
|
@@ -254,11 +254,13 @@
|
|
|
|
# Read options from config file if present.
|
|
import sys
|
|
-sys.path.insert(0,".")
|
|
-try:
|
|
- from config import *
|
|
-except:
|
|
- pass
|
|
+import os
|
|
+cfgpaths = [os.path.join(os.getcwd(),"config.py"),
|
|
+ os.path.join(os.environ["HOME"],".rss2email/config.py"),]
|
|
+for cfgfile in cfgpaths:
|
|
+ if os.path.exists(cfgfile):
|
|
+ execfile(cfgfile)
|
|
+ break
|
|
|
|
warn = sys.stderr
|
|
|