Группа :: Сети/Новости
Пакет: rss2email
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: rss2email-rh-config-location.patch
Скачать
Скачать
--- rss2email/rss2email.py
+++ rss2email/rss2email.py
@@ -254,11 +254,13 @@ BODY_WIDTH = 0
# 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