From d217fe09c6cee316973df0e07de51a5abac970c5 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 9 Sep 2015 22:50:43 +0200 Subject: [PATCH] Hide some more lgo messages on OS X. Fixes #931. --- qutebrowser/utils/log.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index bac158c3d..403222382 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -259,7 +259,7 @@ def qt_message_handler(msg_type, context, msg): # Change levels of some well-known messages to debug so they don't get # shown to the user. # suppressed_msgs is a list of regexes matching the message texts to hide. - suppressed_msgs = ( + suppressed_msgs = [ # PNGs in Qt with broken color profile # https://bugreports.qt.io/browse/QTBUG-39788 "libpng warning: iCCP: Not recognizing known sRGB profile that has " @@ -289,7 +289,14 @@ def qt_message_handler(msg_type, context, msg): 'QXcbWindow: Unhandled client message: "_GTK_', # Happens on AppVeyor CI 'SetProcessDpiAwareness failed:', - ) + ] + if sys.platform == 'darwin': + suppressed_msgs += [ + "libpng warning: iCCP: known incorrect sRGB profile", + "virtual void QSslSocketBackendPrivate::transmit() SSLRead failed " + "with: -9805", + ] + if any(msg.strip().startswith(pattern) for pattern in suppressed_msgs): level = logging.DEBUG else: