MCPcopy
hub / github.com/celery/celery / _import_config_module

Method _import_config_module

celery/loaders/base.py:147–156  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

145 return symbol_by_name(path, imp=imp)
146
147 def _import_config_module(self, name):
148 try:
149 self.find_module(name)
150 except NotAPackage as exc:
151 if name.endswith('.py'):
152 reraise(NotAPackage, NotAPackage(CONFIG_WITH_SUFFIX.format(
153 module=name, suggest=name[:-3])), sys.exc_info()[2])
154 raise NotAPackage(CONFIG_INVALID_NAME.format(module=name)) from exc
155 else:
156 return self.import_from_cwd(name)
157
158 def find_module(self, module):
159 return find_module(module)

Callers 2

read_configurationMethod · 0.95
read_configurationMethod · 0.80

Calls 5

find_moduleMethod · 0.95
import_from_cwdMethod · 0.95
reraiseFunction · 0.90
NotAPackageClass · 0.90
formatMethod · 0.45

Tested by

no test coverage detected