Commit 5e08ab00 authored by Hiro's avatar Hiro 🏄
Browse files

Fix load settings

parent d52c0115
......@@ -25,13 +25,15 @@ class Settings(object):
"""
def __init__(self, config=False):
# Default config
self.filename = self.build_filename()
# If a readable config file was provided, use that instead
if config:
if os.path.isfile(config):
self.filename = config
# Default config
self.filename = self.build_filename()
# Dictionary of available languages,
# mapped to the language name, in that language
self._available_locales = strings.get_locales()
......@@ -62,7 +64,9 @@ class Settings(object):
"dbname": "/srv/gettor.torproject.org/home/gettor/gettor.db",
"email_parser_logfile": "/srv/gettor.torproject.org/home/gettor/log/email_parser.log",
"email_requests_limit": 30,
"twitter_requests_limit": 1,
"sendmail_interval": 10,
"twitter_interval": 10,
"sendmail_addr": "gettor@torproject.org",
"sendmail_host": "localhost",
"sendmail_port": 587,
......@@ -70,7 +74,10 @@ class Settings(object):
"consumer_secret": "",
"access_key": "",
"access_secret": "",
"twitter_handle": "get_tor"
"test_hid": "",
"twitter_handle": "get_tor",
"twitter_messages_endpoint": "https://api.twitter.com/1.1/direct_messages/events/list.json",
"twitter_new_message_endpoint": "https://api.twitter.com/1.1/direct_messages/events/new.json"
}
def get(self, key):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment