Add reactor argument.

This commit is contained in:
Itamar Turner-Trauring 2022-04-06 09:34:17 -04:00
parent 30a3b006a0
commit 5972a13457
2 changed files with 2 additions and 3 deletions
src/allmydata

View File

@ -18,7 +18,6 @@ from twisted.web.iweb import IPolicyForHTTPS
from twisted.internet.defer import inlineCallbacks, returnValue, fail, Deferred
from twisted.internet.interfaces import IOpenSSLClientConnectionCreator
from twisted.internet.ssl import CertificateOptions
from twisted.internet import reactor
from twisted.web.client import Agent, HTTPConnectionPool
from zope.interface import implementer
from hyperlink import DecodedURL
@ -163,7 +162,7 @@ class StorageClient(object):
self._treq = treq
@classmethod
def from_nurl(cls, nurl: DecodedURL, persistent: bool = True) -> "StorageClient":
def from_nurl(cls, nurl: DecodedURL, reactor, persistent: bool = True) -> "StorageClient":
"""
Create a ``StorageClient`` for the given NURL.

View File

@ -1092,7 +1092,7 @@ class _HTTPMixin(_SharedMixin):
# state across tests:
returnValue(
_HTTPStorageServer.from_http_client(
StorageClient.from_nurl(nurl, persistent=False)
StorageClient.from_nurl(nurl, reactor, persistent=False)
)
)