MCPcopy Create free account
hub / github.com/apache/madlib / find_python_module

Method find_python_module

src/madpack/yaml/constructor.py:480–489  ·  view source on GitHub ↗
(self, name, mark)

Source from the content-addressed store, hash-verified

478 return tuple(self.construct_sequence(node))
479
480 def find_python_module(self, name, mark):
481 if not name:
482 raise ConstructorError("while constructing a Python module", mark,
483 "expected non-empty name appended to the tag", mark)
484 try:
485 __import__(name)
486 except ImportError, exc:
487 raise ConstructorError("while constructing a Python module", mark,
488 "cannot find module %r (%s)" % (name.encode('utf-8'), exc), mark)
489 return sys.modules[name]
490
491 def find_python_name(self, name, mark):
492 if not name:

Callers 1

Calls 1

ConstructorErrorClass · 0.85

Tested by

no test coverage detected