Skip to content

Commit

Permalink
Make the local modules available in the path for building the docs #1351
Browse files Browse the repository at this point in the history


Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Aug 8, 2024
1 parent f67bef2 commit 2a5676b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------------------------------------------------

Expand Down
10 changes: 5 additions & 5 deletions scanpipe/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a5676b

Please sign in to comment.