Make some vars private
This commit is contained in:
parent
375af2a3d9
commit
6abb9c626b
|
@ -24,22 +24,22 @@ log = logging.getLogger('gajim.c.m')
|
||||||
|
|
||||||
ZEROCONF_MODULES = ['adhoc_commands', 'receipts', 'discovery']
|
ZEROCONF_MODULES = ['adhoc_commands', 'receipts', 'discovery']
|
||||||
|
|
||||||
imported_modules = [] # type: List[tuple]
|
_imported_modules = [] # type: List[tuple]
|
||||||
_modules = {} # type: Dict[str, Dict[str, Any]]
|
_modules = {} # type: Dict[str, Dict[str, Any]]
|
||||||
|
|
||||||
for file in Path(__file__).parent.iterdir():
|
for file in Path(__file__).parent.iterdir():
|
||||||
if file.stem == '__init__':
|
if file.stem == '__init__':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
module = import_module('.%s' % file.stem, package='gajim.common.modules')
|
_module = import_module('.%s' % file.stem, package='gajim.common.modules')
|
||||||
if hasattr(module, 'get_instance'):
|
if hasattr(_module, 'get_instance'):
|
||||||
log.info('Load module: %s', file.stem)
|
log.info('Load module: %s', file.stem)
|
||||||
if file.stem == 'pep':
|
if file.stem == 'pep':
|
||||||
# Register the PEP module first, because other modules
|
# Register the PEP module first, because other modules
|
||||||
# depend on it
|
# depend on it
|
||||||
imported_modules.insert(0, (module, file.stem))
|
_imported_modules.insert(0, (_module, file.stem))
|
||||||
else:
|
else:
|
||||||
imported_modules.append((module, file.stem))
|
_imported_modules.append((_module, file.stem))
|
||||||
|
|
||||||
|
|
||||||
class ModuleMock:
|
class ModuleMock:
|
||||||
|
@ -74,7 +74,7 @@ def register(con, *args, **kwargs):
|
||||||
if con in _modules:
|
if con in _modules:
|
||||||
return
|
return
|
||||||
_modules[con.name] = {}
|
_modules[con.name] = {}
|
||||||
for module in imported_modules:
|
for module in _imported_modules:
|
||||||
mod, name = module
|
mod, name = module
|
||||||
if con.name == 'Local':
|
if con.name == 'Local':
|
||||||
if name not in ZEROCONF_MODULES:
|
if name not in ZEROCONF_MODULES:
|
||||||
|
|
Loading…
Reference in New Issue