Example #1
0
 def _maybe_create_download_node(self):
     if not self._download_status:
         ds = DownloadStatus(self._verifycap.storage_index,
                             self._verifycap.size)
         if self._history:
             self._history.add_download(ds)
         self._download_status = ds
     if self._node is None:
         self._node = DownloadNode(self._verifycap, self._storage_broker,
                                   self._secret_holder, self._terminator,
                                   self._history, self._download_status)