diff --git a/docs/conf.py b/docs/conf.py index a9aea67f6..397075654 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,8 +11,10 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. import os +import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scancodeio.settings") +sys.path.insert(0, os.path.abspath("../.")) # -- Project information ----------------------------------------------------- diff --git a/scanpipe/pipelines/__init__.py b/scanpipe/pipelines/__init__.py index 12f1b6ae8..95ebe1eb6 100644 --- a/scanpipe/pipelines/__init__.py +++ b/scanpipe/pipelines/__init__.py @@ -135,14 +135,14 @@ def save_errors(self, *exceptions, **kwargs): - Example in a Pipeline step:: - with self.save_errors(rootfs.DistroNotFound): - rootfs.scan_rootfs_for_system_packages(self.project, rfs) + with self.save_errors(rootfs.DistroNotFound): + rootfs.scan_rootfs_for_system_packages(self.project, rfs) - Example when iterating over resources:: - for resource in self.project.codebaseresources.all(): - with self.save_errors(Exception, resource=resource): - analyse(resource) + for resource in self.project.codebaseresources.all(): + with self.save_errors(Exception, resource=resource): + analyse(resource) """ try: yield