Init message.global_bridge at import time

This commit is contained in:
Florian Bruhin 2016-09-15 13:06:44 +02:00
parent 43a5c46d82
commit e32bbfa8f7
3 changed files with 3 additions and 12 deletions

View File

@ -366,9 +366,6 @@ def _init_modules(args, crash_handler):
crash_handler: The CrashHandler instance.
"""
# pylint: disable=too-many-statements
log.init.debug("Initializing messages...")
message.init()
log.init.debug("Initializing save manager...")
save_manager = savemanager.SaveManager(qApp)
objreg.register('save-manager', save_manager)

View File

@ -30,14 +30,6 @@ from PyQt5.QtWidgets import QApplication
from qutebrowser.utils import usertypes, log, objreg, utils
global_bridge = None
def init():
global global_bridge
global_bridge = GlobalMessageBridge()
def _log_stack(typ, stack):
"""Log the given message stacktrace.
@ -236,3 +228,6 @@ class MessageBridge(QObject):
log_stack: ignored
"""
self.s_question.emit(question, blocking)
global_bridge = GlobalMessageBridge()

View File

@ -79,7 +79,6 @@ class MessageMock:
@pytest.fixture
def message_mock():
"""Fixture to get a MessageMock."""
message.init()
mmock = MessageMock()
mmock.patch()
yield mmock