aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2017-04-06 11:15:29 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2017-04-06 11:15:29 +0200
commit48102408931524355a264dbe4f35b747e0f83727 (patch)
tree61f5d010646ad449977b46f7587da5b82b6f8f06
parentrevert (diff)
downloadnewspipe-48102408931524355a264dbe4f35b747e0f83727.tar.gz
newspipe-48102408931524355a264dbe4f35b747e0f83727.tar.bz2
newspipe-48102408931524355a264dbe4f35b747e0f83727.zip
check
-rw-r--r--app.json4
-rw-r--r--src/conf.py10
2 files changed, 10 insertions, 4 deletions
diff --git a/app.json b/app.json
index 0b3922dc..23294639 100644
--- a/app.json
+++ b/app.json
@@ -42,7 +42,7 @@
"TOKEN_VALIDITY_PERIOD": {
"description": "Validity period (in seconds) of the account confirmation link sent by email.",
"required": true,
- "value": 3600
+ "value": "3600"
},
"HEROKU": "1",
"CDN_ADDRESS": "https://cdn.cedricbonhomme.org/",
@@ -54,7 +54,7 @@
},
"FEED_REFRESH_INTERVAL": {
"description": "Feeds refresh interval (in minutes) for the crawler.",
- "value": 120
+ "value": "120"
}
},
"addons": [
diff --git a/src/conf.py b/src/conf.py
index 70fde9c4..756c1557 100644
--- a/src/conf.py
+++ b/src/conf.py
@@ -80,7 +80,10 @@ PLATFORM_URL = config.get('misc', 'platform_url')
ADMIN_EMAIL = config.get('misc', 'admin_email')
SELF_REGISTRATION = config.getboolean('misc', 'self_registration')
SECURITY_PASSWORD_SALT = config.get('misc', 'security_password_salt')
-TOKEN_VALIDITY_PERIOD = config.getint('misc', 'token_validity_period')
+try:
+ TOKEN_VALIDITY_PERIOD = config.getint('misc', 'token_validity_period')
+except:
+ TOKEN_VALIDITY_PERIOD = int(config.get('misc', 'token_validity_period'))
if not ON_HEROKU:
LOG_PATH = os.path.abspath(config.get('misc', 'log_path'))
else:
@@ -99,7 +102,10 @@ DEFAULT_MAX_ERROR = config.getint('crawler', 'default_max_error')
ERROR_THRESHOLD = int(DEFAULT_MAX_ERROR / 2)
CRAWLER_TIMEOUT = config.get('crawler', 'timeout')
CRAWLER_RESOLV = config.getboolean('crawler', 'resolv')
-FEED_REFRESH_INTERVAL = config.getint('crawler', 'feed_refresh_interval')
+try:
+ FEED_REFRESH_INTERVAL = config.getint('crawler', 'feed_refresh_interval')
+except:
+ FEED_REFRESH_INTERVAL = int(config.get('crawler', 'feed_refresh_interval'))
NOTIFICATION_EMAIL = config.get('notification', 'notification_email')
NOTIFICATION_HOST = config.get('notification', 'host')
bgstack15