WorkerManager addTask returns task instead of event

This commit is contained in:
shortcutme 2017-10-03 15:47:46 +02:00
parent 468fe8f266
commit 9b8eeb6a73
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 4 additions and 4 deletions

View file

@ -737,7 +737,7 @@ class Site(object):
gevent.spawn(self.announce)
if inner_path != "content.json": # Prevent double download
task = self.worker_manager.addTask("content.json", peer)
task.get()
task["evt"].get()
self.content_manager.loadContent()
if not self.content_manager.contents.get("content.json"):
return False # Content.json download failed
@ -762,7 +762,7 @@ class Site(object):
task = self.worker_manager.addTask(inner_path, peer, priority=priority)
if blocking:
return task.get()
return task["evt"].get()
else:
return task