This commit is contained in:
meejah 2018-01-28 21:58:24 -07:00
parent 0ff21ea7d5
commit f0c3db0e5a
8 changed files with 6 additions and 13 deletions

View File

@ -529,8 +529,6 @@ class _Client(node.Node, pollmixin.PollMixin):
ps = self.config.get_config("client", "peers.preferred", "").split(",")
preferred_peers = tuple([p.strip() for p in ps if p != ""])
from allmydata.node import create_tub, create_tub_options
# this is temporary; create_client() should create a
# storage-broker and pass it in -- that method already has
# all these objects created...

View File

@ -48,7 +48,6 @@ def create_introducer(basedir=u"."):
)
# XXX fix up imports etc (also: reactor)
from twisted.internet import reactor
from allmydata.node import create_i2p_provider, create_tor_provider
i2p_provider = create_i2p_provider(reactor, basedir, config)
tor_provider = create_tor_provider(reactor, basedir, config)

View File

@ -12,7 +12,6 @@ import tempfile
from io import BytesIO
from base64 import b32decode, b32encode
from twisted.internet import reactor
from twisted.python import log as twlog
from twisted.application import service
from twisted.python.failure import Failure

View File

@ -4,7 +4,6 @@ from mock import patch, Mock
from StringIO import StringIO
from sys import getfilesystemencoding
from twisted.trial import unittest
from twisted.internet import defer
from allmydata.scripts import runner
from allmydata.scripts.tahoe_daemonize import identify_node_type
from allmydata.scripts.tahoe_daemonize import DaemonizeTahoeNodePlugin

View File

@ -222,7 +222,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
"[storage]\n" + \
"enabled = true\n" + \
"reserved_space = bogus\n")
with self.assertRaises(ValueError) as ctx:
with self.assertRaises(ValueError):
yield client.create_client(basedir)
@defer.inlineCallbacks

View File

@ -8,7 +8,6 @@ from ..node import Node, PrivacyError, config_from_string
from ..node import create_connection_handlers
from ..node import create_i2p_provider, create_tor_provider
from ..node import create_main_tub, _tub_portlocation
from ..client import create_client_from_config
from ..util import connection_status
@ -161,7 +160,7 @@ class Tor(unittest.TestCase):
)
with self.assertRaises(ValueError) as ctx:
tor_provider = create_tor_provider(reactor, 'BASEDIR', config)
h = tor_provider.get_tor_handler()
tor_provider.get_tor_handler()
self.assertIn(
"Unknown endpoint type: 'meow'",
str(ctx.exception)
@ -175,7 +174,7 @@ class Tor(unittest.TestCase):
)
with self.assertRaises(ValueError) as ctx:
tor_provider = create_tor_provider(reactor, 'BASEDIR', config)
h = tor_provider.get_tor_handler()
tor_provider.get_tor_handler()
self.assertIn(
"invalid literal for int() with base 10: 'kumquat'",
str(ctx.exception)
@ -257,7 +256,7 @@ class I2P(unittest.TestCase):
)
with self.assertRaises(ValueError) as ctx:
i2p_provider = create_i2p_provider(reactor, 'BASEDIR', config)
h = i2p_provider.get_i2p_handler()
i2p_provider.get_i2p_handler()
self.assertIn(
"must not set both sam.port and launch",
str(ctx.exception)

View File

@ -15,9 +15,8 @@ from foolscap.api import flushEventualQueue
import foolscap.logging.log
from twisted.application import service
from allmydata.node import Node, formatTimeTahoeStyle, MissingConfigEntry, read_config, config_from_string, create_node_dir
from allmydata.node import create_tub
from allmydata.node import create_tub_options
from allmydata.node import create_tub
from allmydata.node import create_main_tub
from allmydata.node import create_connection_handlers
from allmydata.introducer.server import create_introducer

View File

@ -784,7 +784,7 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
c.setServiceParent(self.sparent)
else:
c.startService()
res = yield self.wait_for_connections()
yield self.wait_for_connections()
defer.returnValue(c)
def _check_connections(self):