From 003a9074d2f3d9566156d61339b96ceca72b887d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Serneels?= Date: Thu, 4 Apr 2019 00:15:31 +0200 Subject: [PATCH] make server file configurable --- config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 58b5751..2e283e1 100644 --- a/config.py +++ b/config.py @@ -4,7 +4,8 @@ class Config(ComboParser): def load(self): super(Config, self).load() self.torhosts = [ str(i).strip() for i in self.common.tor_hosts.split(',') ] - with open('servers.txt', 'r') as handle: + #with open('servers.txt', 'r') as handle: + with open(self.watchd.source_file, 'r') as handle: self.servers = [x.strip() for x in handle.readlines() if len(x.strip()) > 0] def __init__(self): super(Config, self).__init__('config.ini') @@ -25,6 +26,7 @@ class Config(ComboParser): self.add_item(section, 'oldies', bool, False, 're-test old proxies as well ? (default: False)', False) self.add_item(section, 'oldies_checktime', int, 43200, 'base checking interval for *old* proxies in seconds (default: 43200)', False) self.add_item(section, 'oldies_multi', int, 100, 'fetch threads*multi rows when testing oldies (default: 100)', False) + self.add_item(section, 'source_file', str, 'servers.txt', 'server/url list to read from (default: servers.txt)', False) section = 'ppf' self.add_item(section, 'debug', bool, False, 'whether to print additional debug info', False)