Hide all OpenType warnings.
This commit is contained in:
parent
5e6cddecaf
commit
282874cc80
@ -132,10 +132,11 @@ def qt_message_handler(msg_type, context, msg):
|
|||||||
}
|
}
|
||||||
# Change levels of some well-known messages to debug so they don't get
|
# Change levels of some well-known messages to debug so they don't get
|
||||||
# shown to the user.
|
# shown to the user.
|
||||||
|
# suppressed_msgs is a list of regexes matching the message texts to hide.
|
||||||
suppressed_msgs = ["libpng warning: iCCP: Not recognizing known sRGB "
|
suppressed_msgs = ["libpng warning: iCCP: Not recognizing known sRGB "
|
||||||
"profile that has been edited",
|
"profile that has been edited",
|
||||||
"OpenType support missing for script 19"]
|
"OpenType support missing for script [0-9]*"]
|
||||||
if msg.strip() in suppressed_msgs:
|
if any(re.match(pattern, msg.strip()) for pattern in suppressed_msgs):
|
||||||
level = logging.DEBUG
|
level = logging.DEBUG
|
||||||
else:
|
else:
|
||||||
level = qt_to_logging[msg_type]
|
level = qt_to_logging[msg_type]
|
||||||
|
Loading…
Reference in New Issue
Block a user