• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lbryio / lbry-sdk / 4599645360

pending completion
4599645360

push

github

GitHub
Bump cryptography from 2.5 to 39.0.1

2807 of 6557 branches covered (42.81%)

Branch coverage included in aggregate %.

12289 of 19915 relevant lines covered (61.71%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.59
/lbry/stream/background_downloader.py
1
import asyncio
1✔
2
import logging
1✔
3

4
from lbry.stream.downloader import StreamDownloader
1✔
5

6

7
log = logging.getLogger(__name__)
1✔
8

9

10
class BackgroundDownloader:
1✔
11
    def __init__(self, conf, storage, blob_manager, dht_node=None):
1✔
12
        self.storage = storage
×
13
        self.blob_manager = blob_manager
×
14
        self.node = dht_node
×
15
        self.conf = conf
×
16

17
    async def download_blobs(self, sd_hash):
1✔
18
        downloader = StreamDownloader(asyncio.get_running_loop(), self.conf, self.blob_manager, sd_hash)
×
19
        try:
×
20
            await downloader.start(self.node, save_stream=False)
×
21
            for blob_info in downloader.descriptor.blobs[:-1]:
×
22
                await downloader.download_stream_blob(blob_info)
×
23
        except ValueError:
×
24
            return
×
25
        except asyncio.CancelledError:
×
26
            log.debug("Cancelled background downloader")
×
27
            raise
×
28
        except Exception:
×
29
            log.error("Unexpected download error on background downloader")
×
30
        finally:
31
            downloader.stop()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc