Fix ipc.py coverage.

This commit is contained in:
Florian Bruhin 2015-10-02 08:17:50 +02:00
parent 454b2348a8
commit b42b12b7a5

View File

@ -343,10 +343,10 @@ class IPCServer(QObject):
"""Cancel the current connection if it was idle for too long.""" """Cancel the current connection if it was idle for too long."""
log.ipc.error("IPC connection timed out.") log.ipc.error("IPC connection timed out.")
self._socket.disconnectFromServer() self._socket.disconnectFromServer()
if self._socket is not None: # pragma: no branch if self._socket is not None: # pragma: no cover
# on_socket_disconnected sets it to None # on_socket_disconnected sets it to None
self._socket.waitForDisconnected(CONNECT_TIMEOUT) self._socket.waitForDisconnected(CONNECT_TIMEOUT)
if self._socket is not None: # pragma: no branch if self._socket is not None: # pragma: no cover
# on_socket_disconnected sets it to None # on_socket_disconnected sets it to None
self._socket.abort() self._socket.abort()