File rss2email-2.70-config-location.patch of Package rss2email

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
 	
openSUSE Build Service is sponsored by