cleanup: remove unused imports and dead code
This commit is contained in:
@@ -8,7 +8,6 @@ class Config(ComboParser):
|
||||
self.torhosts = [ str(i).strip() for i in self.common.tor_hosts.split(',') ]
|
||||
# threads config = per-host value, multiply by Tor host count
|
||||
self.watchd.threads = self.watchd.threads * len(self.torhosts)
|
||||
#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]
|
||||
# Parse checktypes as comma-separated list
|
||||
|
||||
@@ -88,9 +88,6 @@ class RocksockException(Exception):
|
||||
import sys
|
||||
ei = sys.exc_info()
|
||||
raise(ei[0], ei[1], ei[2])
|
||||
# import traceback, sys
|
||||
# traceback.print_exc(file=sys.stderr)
|
||||
# raise(self)
|
||||
|
||||
def get_errormessage(self):
|
||||
errordict = {
|
||||
@@ -251,9 +248,6 @@ class Rocksock():
|
||||
x = af+1
|
||||
except TypeError:
|
||||
raise(RocksockException(-3, "unexpected problem resolving DNS, try again", failedproxy=self._failed_proxy(0), errortype=RS_ET_GAI))
|
||||
# print("GOT A WEIRD AF")
|
||||
# print(af)
|
||||
# raise(RocksockException(-6666, af, errortype=RS_ET_GAI))
|
||||
|
||||
self.sock = socket.socket(af, socket.SOCK_STREAM)
|
||||
self.sock.settimeout(None if self.timeout == 0 else self.timeout)
|
||||
|
||||
@@ -7,9 +7,7 @@ import json
|
||||
import random
|
||||
import time
|
||||
import threading
|
||||
import urllib
|
||||
import mysqlite
|
||||
import proxywatchd
|
||||
from misc import _log
|
||||
from config import Config
|
||||
import fetch
|
||||
|
||||
Reference in New Issue
Block a user