aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-07-07 18:50:05 +0200
committercedricbonhomme <devnull@localhost>2011-07-07 18:50:05 +0200
commitb0905c4c5c5c1f4fa6b78c8ed823958bf2c83d9e (patch)
tree2ae27119be4a9ebf609886a636c7968627e8fe60 /utils.py
parentMinor improvements: the database was readed two time at boot. (diff)
downloadnewspipe-b0905c4c5c5c1f4fa6b78c8ed823958bf2c83d9e.tar.gz
newspipe-b0905c4c5c5c1f4fa6b78c8ed823958bf2c83d9e.tar.bz2
newspipe-b0905c4c5c5c1f4fa6b78c8ed823958bf2c83d9e.zip
Minor improvements: if pyAggr3g470r.cfg is not present, try to read pyAggr3g470r.cfg-sample.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index e145b6b2..6c7ee14b 100755
--- a/utils.py
+++ b/utils.py
@@ -59,7 +59,10 @@ import os
import ConfigParser
# load the configuration
config = ConfigParser.RawConfigParser()
-config.read("./cfg/pyAggr3g470r.cfg")
+try:
+ config.read("./cfg/pyAggr3g470r.cfg")
+except:
+ config.read("./cfg/pyAggr3g470r.cfg-sample")
path = os.path.abspath(".")
sqlite_base = os.path.abspath(config.get('global', 'sqlitebase'))
MAX_NB_ARTICLES = int(config.get('global', 'max_nb_articles'))
bgstack15