Add workaround for OS X issue.

This commit is contained in:
Florian Bruhin 2015-09-09 20:48:23 +02:00
parent f7d3070c34
commit 2ca8070e7a

View File

@ -360,8 +360,12 @@ def _has_legacy_server(name):
log.ipc.debug("Socket error: {} ({})".format( log.ipc.debug("Socket error: {} ({})".format(
socket.errorString(), err)) socket.errorString(), err))
os_x_fail = (sys.platform == 'darwin' and
socket.errorString() == 'QLocalSocket::connectToServer: '
'Unknown error 38')
if err not in [QLocalSocket.ServerNotFoundError, if err not in [QLocalSocket.ServerNotFoundError,
QLocalSocket.ConnectionRefusedError]: QLocalSocket.ConnectionRefusedError] and not os_x_fail:
return True return True
socket.disconnectFromServer() socket.disconnectFromServer()