[golemfactory/golem] Client.{create,restart}_task: restore returning task id (#3031)

etam commented on this pull request.

> @@ -638,7 +643,9 @@ def task_created(resource_server_result):

def error(exception):
logger.error(«Task ‘%s’ creation failed: %r», task_id, exception)
— _result.errback(exception)
+ e = CreatingTaskFailed(task_id)
+ e.__cause__ = exception

Maybe…? I’m violating Python anyway, because `__cause__` is supposed to be set by calling `raise CreatingTaskFailed(task_id) from exception`. So I don’t think it’s legitimate to assign this in constructor.

Добавить комментарий