Skip to content

Commit

Permalink
Fix python lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares authored Jan 29, 2024
1 parent 2aa77f0 commit 9394fb2
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions cuegui/cuegui/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ def startup(app_name, app_version, argv):
mainWindow.displayStartupNotice()
mainWindow.show()

# Custom qt message handler to ignore known warnings
QtCore.qInstallMessageHandler(warning_handler)

# Open all windows that were open when the app was last closed
for name in mainWindow.windows_names[1:]:
if settings.value("%s/Open" % name, False):
Expand All @@ -95,19 +92,6 @@ def startup(app_name, app_version, argv):
app.aboutToQuit.connect(closingTime) # pylint: disable=no-member
app.exec_()

def warning_handler(msg_type, msg_log_context, msg_string):
"""
Ignore known warning messages (from LogViewPlugin for now) that
happens when multi-threaded/multiple updates in a short span
"""
if ('QTextCursor::setPosition:' in msg_string or
'SelectionRequest too old' in msg_string):
return
else:
# Todo: write to a log file
print ('{}: {}, Message: {}'.format(
str(msg_type), str(msg_log_context), str(msg_string)))

def closingTime():
"""Window close callback."""
logger.info("Closing all threads...")
Expand Down

0 comments on commit 9394fb2

Please sign in to comment.