From c818ea491f14a8c483d7bd7325863c4bbbd9caa3 Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Tue, 28 Nov 2023 14:26:36 +0100 Subject: [PATCH] Make debugging easier by re-raising BdbQuit Signed-off-by: Carmen Bianca BAKKER --- src/reuse/report.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reuse/report.py b/src/reuse/report.py index 1f54548d7..999b193d6 100644 --- a/src/reuse/report.py +++ b/src/reuse/report.py @@ -8,6 +8,7 @@ """Module that contains reports about files and projects for linting.""" +import bdb import contextlib import datetime import logging @@ -302,6 +303,9 @@ def generate( for result in results: if result.error: + # Facilitate better debugging by being able to quit the program. + if isinstance(result.error, bdb.BdbQuit): + raise bdb.BdbQuit() from result.error if isinstance(result.error, (OSError, UnicodeError)): _LOGGER.error( _("Could not read '{path}'").format(path=result.path),