Commit 4ad38d53 authored by Philipp Hörist's avatar Philipp Hörist

Make some vars private

parent dad7def7
......@@ -24,22 +24,22 @@
ZEROCONF_MODULES = ['adhoc_commands', 'receipts', 'discovery']
imported_modules = [] # type: List[tuple]
_imported_modules = [] # type: List[tuple]
_modules = {} # type: Dict[str, Dict[str, Any]]
for file in Path(__file__).parent.iterdir():
if file.stem == '__init__':
module = import_module('.%s' % file.stem, package='gajim.common.modules')
if hasattr(module, 'get_instance'):
_module = import_module('.%s' % file.stem, package='gajim.common.modules')
if hasattr(_module, 'get_instance'):'Load module: %s', file.stem)
if file.stem == 'pep':
# Register the PEP module first, because other modules
# depend on it
imported_modules.insert(0, (module, file.stem))
_imported_modules.insert(0, (_module, file.stem))
imported_modules.append((module, file.stem))
_imported_modules.append((_module, file.stem))
class ModuleMock:
......@@ -74,7 +74,7 @@ def register(con, *args, **kwargs):
if con in _modules:
_modules[] = {}
for module in imported_modules:
for module in _imported_modules:
mod, name = module
if == 'Local':
if name not in ZEROCONF_MODULES:
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