Commit 42ccbe74 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Dont fail if modules are not registered

This is for Zeroconf so we dont have to test in GUI always for
account != local

Fixes #9229
parent a4350a81
......@@ -63,6 +63,7 @@
from gajim.common import passwords
from gajim.common import i18n
from gajim.common import idle
from gajim.common.helpers import ModuleMock
from gajim.common.modules.entity_time import EntityTime
from gajim.common.modules.software_version import SoftwareVersion
from import Ping
......@@ -179,7 +180,10 @@ def dispatch(self, event, data):
app.ged.raise_event(event,, data)
def get_module(self, name):
return self._modules[name]
return self._modules[name]
except KeyError:
return ModuleMock()
def get_module_handlers(self):
handlers = []
......@@ -164,6 +164,14 @@ def _isdst(self, dt):
class InvalidFormat(Exception):
class ModuleMock:
def __getattr__(self, key):
def _mock(self, *args, **kwargs):
return _mock
def decompose_jid(jidstring):
user = None
server = None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment