[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/master] Fix load settings
commit 5e08ab00607f792c86ba3aba168b49b48bf6ff94
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Tue Oct 15 16:21:50 2019 +0200
Fix load settings
---
gettor/utils/settings.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/gettor/utils/settings.py b/gettor/utils/settings.py
index c849803..1a33bb2 100644
--- a/gettor/utils/settings.py
+++ b/gettor/utils/settings.py
@@ -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@xxxxxxxxxxxxxx",
"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):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits