Fix returning reply on postFormWithParts

This commit is contained in:
ChrisTerBeke 2018-11-21 00:03:36 +01:00
parent c7bb6931f4
commit 8ad8489af0
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263

View file

@ -195,7 +195,7 @@ class NetworkClient:
## Does a POST request with form parts to the given URL.
def postFormWithParts(self, target: str, parts: List[QHttpPart],
on_finished: Optional[Callable[[QNetworkReply], None]],
on_progress: Callable = None) -> None:
on_progress: Callable = None) -> QNetworkReply:
self._validateManager()
request = self._createEmptyRequest(target, content_type = None)
@ -218,3 +218,4 @@ class NetworkClient:
reply.uploadProgress.connect(on_progress)
self._registerOnFinishedCallback(reply, on_finished)
return reply