MCPcopy Create free account
hub / github.com/intelowlproject/IntelOwl / _clean_python_module

Method _clean_python_module

api_app/models.py:232–244  ·  view source on GitHub ↗

Validate the Python module. Raises: ValidationError: If the module cannot be imported.

(self)

Source from the content-addressed store, hash-verified

230 return None
231
232 def _clean_python_module(self):
233 """
234 Validate the Python module.
235
236 Raises:
237 ValidationError: If the module cannot be imported.
238 """
239 try:
240 _ = self.python_class
241 except ImportError as exc:
242 raise ValidationError(
243 f"`python_module` incorrect, {self.python_complete_path} couldn't be imported"
244 ) from exc
245
246 def clean(self) -> None:
247 """

Callers 2

cleanMethod · 0.95

Calls

no outgoing calls

Tested by 1