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