Skip to content

Commit

Permalink
formatting exception for OpenSSF Scorecard pickling error more typically
Browse files Browse the repository at this point in the history
Signed-off-by: Sean P. Goggins <s@goggins.com>
  • Loading branch information
sgoggins committed Aug 14, 2024
1 parent 9aee7ab commit eb4fa84
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions augur/tasks/git/dependency_tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ def process_ossf_dependency_metrics(self, repo_git):

logger = logging.getLogger(process_ossf_dependency_metrics.__name__)

try:
try:
generate_scorecard(logger, repo_git)
except Exception as e:
except Exception as e:
logger.warning(f'Exception generating scorecard: {e}')
raise MetadataException
tracer = ''.join(traceback.format_exception(type(e), e, e.__traceback__))
logger.warning(f'Full stack trace of OpenSSF scorecard error: {tracer}')
raise MetadataException(f"An error occurred while generating the scorecard: {str(e)}")

"""
This try/except block is an attempt to get more information about this occasional error:
Expand Down

0 comments on commit eb4fa84

Please sign in to comment.