mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: correct initialisation of background downloader callbacks
Fix a bug in the initialisation of the background downloader's callback dict.
This commit is contained in:
parent
8781b96a4f
commit
68152de889
1 changed files with 2 additions and 3 deletions
|
|
@ -476,8 +476,7 @@ class BackgroundDownloader:
|
|||
# This assumes that RequestDescriptions are unique, and not queued up
|
||||
# multiple times simultaneously.
|
||||
DownloadDoneCallback: TypeAlias = Callable[['RequestDescription', Path], None]
|
||||
_on_download_done_callbacks: dict[RequestDescription,
|
||||
list[DownloadDoneCallback | None]] = collections.defaultdict(list)
|
||||
_on_download_done_callbacks: dict[RequestDescription, list[DownloadDoneCallback | None]]
|
||||
|
||||
OnCallbackErrorCallback: TypeAlias = Callable[['RequestDescription', Path, Exception], None]
|
||||
_on_callback_error: OnCallbackErrorCallback
|
||||
|
|
@ -504,7 +503,7 @@ class BackgroundDownloader:
|
|||
self.num_downloads_ok = 0
|
||||
self.num_downloads_error = 0
|
||||
self._num_pending_downloads = 0
|
||||
self._on_download_done_callbacks = {}
|
||||
self._on_download_done_callbacks = collections.defaultdict(list)
|
||||
self._on_callback_error = on_callback_error
|
||||
|
||||
self._queueing_reporter = QueueingReporter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue