diff --git a/lbrynet/daemon/Components.py b/lbrynet/daemon/Components.py index 5d39dc171..c93f78845 100644 --- a/lbrynet/daemon/Components.py +++ b/lbrynet/daemon/Components.py @@ -28,7 +28,7 @@ from lbrynet.dht import node, hashannouncer from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager from lbrynet.lbry_file.client.EncryptedFileDownloader import EncryptedFileSaverFactory from lbrynet.lbry_file.client.EncryptedFileOptions import add_lbry_file_to_sd_identifier -from lbrynet.reflector import ServerFactory as reflector_server_factory +from lbrynet.extras.reflector import ServerFactory as reflector_server_factory from lbrynet.core.utils import generate_id diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index c3de36e9b..dfbb8cbb2 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -27,7 +27,7 @@ from lbrynet.schema.decode import smart_decode # TODO: importing this when internet is disabled raises a socket.gaierror from lbrynet.core.system_info import get_lbrynet_version from lbrynet import conf -from lbrynet.reflector import reupload +from lbrynet.extras.reflector import reupload from lbrynet.daemon.Components import d2f, f2d from lbrynet.daemon.Components import WALLET_COMPONENT, DATABASE_COMPONENT, DHT_COMPONENT, BLOB_COMPONENT from lbrynet.daemon.Components import STREAM_IDENTIFIER_COMPONENT, FILE_MANAGER_COMPONENT, RATE_LIMITER_COMPONENT diff --git a/lbrynet/extras/reflector/__init__.py b/lbrynet/extras/reflector/__init__.py index 06dd0b4e9..d05ef4820 100644 --- a/lbrynet/extras/reflector/__init__.py +++ b/lbrynet/extras/reflector/__init__.py @@ -63,7 +63,6 @@ If the transfer was not successful (False), the blob is re-added to the needed_b Blob requests continue for each of the blobs the client has queued to send, when completed the client disconnects. """ - -from lbrynet.reflector.server.server import ReflectorServerFactory as ServerFactory -from lbrynet.reflector.client.client import EncryptedFileReflectorClientFactory as ClientFactory -from lbrynet.reflector.client.blob import BlobReflectorClientFactory as BlobClientFactory +from .server.server import ReflectorServerFactory as ServerFactory +from .client.client import EncryptedFileReflectorClientFactory as ClientFactory +from .client.blob import BlobReflectorClientFactory as BlobClientFactory diff --git a/lbrynet/extras/reflector/client/blob.py b/lbrynet/extras/reflector/client/blob.py index 54497cc46..38b32b6d0 100644 --- a/lbrynet/extras/reflector/client/blob.py +++ b/lbrynet/extras/reflector/client/blob.py @@ -5,7 +5,7 @@ from twisted.protocols.basic import FileSender from twisted.internet.protocol import Protocol, ClientFactory from twisted.internet import defer, error -from lbrynet.reflector.common import IncompleteResponse, REFLECTOR_V2 +from lbrynet.extras.reflector.common import IncompleteResponse, REFLECTOR_V2 log = logging.getLogger(__name__) diff --git a/lbrynet/extras/reflector/client/client.py b/lbrynet/extras/reflector/client/client.py index 977d92670..213b33f69 100644 --- a/lbrynet/extras/reflector/client/client.py +++ b/lbrynet/extras/reflector/client/client.py @@ -6,8 +6,8 @@ from twisted.protocols.basic import FileSender from twisted.internet.protocol import Protocol, ClientFactory from twisted.internet import defer, error -from lbrynet.reflector.common import IncompleteResponse, ReflectorRequestError -from lbrynet.reflector.common import REFLECTOR_V1, REFLECTOR_V2 +from lbrynet.extras.reflector.common import IncompleteResponse, ReflectorRequestError +from lbrynet.extras.reflector.common import REFLECTOR_V1, REFLECTOR_V2 log = logging.getLogger(__name__) diff --git a/lbrynet/extras/reflector/reupload.py b/lbrynet/extras/reflector/reupload.py index e770cc883..a2b1548e3 100644 --- a/lbrynet/extras/reflector/reupload.py +++ b/lbrynet/extras/reflector/reupload.py @@ -2,7 +2,7 @@ import random from twisted.internet import reactor, defer from lbrynet import conf -from lbrynet.reflector import ClientFactory, BlobClientFactory +from . import ClientFactory, BlobClientFactory def _is_ip(host): diff --git a/lbrynet/extras/reflector/server/server.py b/lbrynet/extras/reflector/server/server.py index 289e0e036..d0bae71e2 100644 --- a/lbrynet/extras/reflector/server/server.py +++ b/lbrynet/extras/reflector/server/server.py @@ -7,8 +7,8 @@ from lbrynet.core.utils import is_valid_blobhash from lbrynet.core.Error import DownloadCanceledError, InvalidBlobHashError from lbrynet.core.StreamDescriptor import BlobStreamDescriptorReader from lbrynet.core.StreamDescriptor import save_sd_info -from lbrynet.reflector.common import REFLECTOR_V1, REFLECTOR_V2 -from lbrynet.reflector.common import ReflectorRequestError, ReflectorClientVersionError +from lbrynet.extras.reflector.common import REFLECTOR_V1, REFLECTOR_V2 +from lbrynet.extras.reflector.common import ReflectorRequestError, ReflectorClientVersionError log = logging.getLogger(__name__) diff --git a/lbrynet/file_manager/EncryptedFileManager.py b/lbrynet/file_manager/EncryptedFileManager.py index ff48cee81..4a710bce3 100644 --- a/lbrynet/file_manager/EncryptedFileManager.py +++ b/lbrynet/file_manager/EncryptedFileManager.py @@ -7,7 +7,7 @@ from binascii import hexlify, unhexlify from twisted.internet import defer, task, reactor from twisted.python.failure import Failure -from lbrynet.reflector.reupload import reflect_file +from lbrynet.extras.reflector.reupload import reflect_file from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloader from lbrynet.file_manager.EncryptedFileDownloader import ManagedEncryptedFileDownloaderFactory from lbrynet.core.StreamDescriptor import EncryptedFileStreamType, get_sd_info diff --git a/tests/functional/test_reflector.py b/tests/functional/test_reflector.py index ac2982a53..877d427e2 100644 --- a/tests/functional/test_reflector.py +++ b/tests/functional/test_reflector.py @@ -4,7 +4,7 @@ from binascii import hexlify from twisted.internet import defer, error from twisted.trial import unittest from lbrynet.core.StreamDescriptor import get_sd_info -from lbrynet import reflector +from lbrynet.extras import reflector from lbrynet.core import BlobManager, PeerManager from lbrynet.core import StreamDescriptor from lbrynet.file_manager import EncryptedFileCreator