From 5972a13457f9b0104f77551681f81a3525992965 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Wed, 6 Apr 2022 09:34:17 -0400 Subject: [PATCH] Add reactor argument. --- src/allmydata/storage/http_client.py | 3 +-- src/allmydata/test/test_istorageserver.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/allmydata/storage/http_client.py b/src/allmydata/storage/http_client.py index 06b9b1145..766036427 100644 --- a/src/allmydata/storage/http_client.py +++ b/src/allmydata/storage/http_client.py @@ -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. diff --git a/src/allmydata/test/test_istorageserver.py b/src/allmydata/test/test_istorageserver.py index 9a9a1d39a..c5c515434 100644 --- a/src/allmydata/test/test_istorageserver.py +++ b/src/allmydata/test/test_istorageserver.py @@ -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) ) )