Only log messages without status when we are not in error mode.

This prevents spamming the logs with messages
This commit is contained in:
Jaime van Kessel 2016-08-17 13:09:04 +02:00
parent f60871e068
commit 1dbd789d10

View file

@ -508,7 +508,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
status_code = reply.attribute(QNetworkRequest.HttpStatusCodeAttribute)
if not status_code:
Logger.log("d", "A reply from %s did not have status code.", reply.url().toString())
if self._connection_state != ConnectionState.error:
Logger.log("d", "A reply from %s did not have status code.", reply.url().toString())
# Received no or empty reply
return
reply_url = reply.url().toString()