From d21313e590271634b581926a532ab097fd5f37f8 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 7 Aug 2018 13:55:45 -0300 Subject: [PATCH 1/2] allow mirrors if conf is set, but clear it for tests --- lbrynet/file_manager/EncryptedFileDownloader.py | 2 +- lbrynet/tests/mocks.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/file_manager/EncryptedFileDownloader.py b/lbrynet/file_manager/EncryptedFileDownloader.py index c5decff50..29fc92c1a 100644 --- a/lbrynet/file_manager/EncryptedFileDownloader.py +++ b/lbrynet/file_manager/EncryptedFileDownloader.py @@ -57,7 +57,7 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver): self.channel_name = None self.metadata = None self.mirror = None - if download_mirrors: + if download_mirrors or conf.settings['download_mirrors']: self.mirror = HTTPBlobDownloader( self.blob_manager, servers=download_mirrors or conf.settings['download_mirrors'] ) diff --git a/lbrynet/tests/mocks.py b/lbrynet/tests/mocks.py index 3716587f3..91bb8f3c6 100644 --- a/lbrynet/tests/mocks.py +++ b/lbrynet/tests/mocks.py @@ -495,6 +495,7 @@ create_stream_sd_file = { def mock_conf_settings(obj, settings={}): + settings.setdefault('download_mirrors', []) conf.initialize_settings(False) original_settings = conf.settings conf.settings = conf.Config(conf.FIXED_SETTINGS, conf.ADJUSTABLE_SETTINGS) From 20d8b2963c846e4939d72a4111d6bb803f77283e Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 7 Aug 2018 14:01:46 -0300 Subject: [PATCH 2/2] adds a CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index acd74ca62..a5d428412 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ at anytime. * ### Fixed + * mirroring being set on tests, making unrelated tests fail * loggly error reporting not following `share_usage_data` * improper error handling when data is not valid JSON * edge cases of http mirrored download of blobs