Mercurial > libervia-backend
diff sat/tools/common/dynamic_import.py @ 2624:56f94936df1e
code style reformatting using black
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 27 Jun 2018 20:14:46 +0200 |
parents | 26edcf3a30eb |
children | 003b8b4b56a7 |
line wrap: on
line diff
--- a/sat/tools/common/dynamic_import.py Wed Jun 27 07:51:29 2018 +0200 +++ b/sat/tools/common/dynamic_import.py Wed Jun 27 20:14:46 2018 +0200 @@ -22,7 +22,7 @@ from importlib import import_module -def bridge(name, module_path='sat.bridge'): +def bridge(name, module_path="sat.bridge"): """Import bridge module @param module_path(str): path of the module to import @@ -30,10 +30,10 @@ @return (module, None): imported module or None if nothing is found """ try: - bridge_module = import_module(module_path + '.' + name) + bridge_module = import_module(module_path + "." + name) except ImportError: try: - bridge_module = import_module(module_path + '.' + name + '_bridge') + bridge_module = import_module(module_path + "." + name + "_bridge") except ImportError: bridge_module = None return bridge_module