From bca08bd7434a318772a17ff4d4a9ecbbfee0fca8 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 23 Mar 2011 19:50:00 +0000 Subject: [PATCH 1/1] Handle exceptions in dak contents scan-source. Signed-off-by: Torsten Werner --- dak/contents.py | 4 ++-- daklib/contents.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dak/contents.py b/dak/contents.py index 9c85a50a..ee904b2a 100755 --- a/dak/contents.py +++ b/dak/contents.py @@ -89,7 +89,7 @@ def write_all(cnf, suite_names = [], force = None): ################################################################################ def binary_scan_all(cnf, limit): - Logger = daklog.Logger(cnf.Cnf, 'contents binary_scan') + Logger = daklog.Logger(cnf.Cnf, 'contents scan-binary') result = BinaryContentsScanner.scan_all(limit) processed = '%(processed)d packages processed' % result remaining = '%(remaining)d packages remaining' % result @@ -99,7 +99,7 @@ def binary_scan_all(cnf, limit): ################################################################################ def source_scan_all(cnf, limit): - Logger = daklog.Logger(cnf.Cnf, 'contents source_scan') + Logger = daklog.Logger(cnf.Cnf, 'contents scan-source') result = SourceContentsScanner.scan_all(limit) processed = '%(processed)d packages processed' % result remaining = '%(remaining)d packages remaining' % result diff --git a/daklib/contents.py b/daklib/contents.py index 8c064226..69000acf 100755 --- a/daklib/contents.py +++ b/daklib/contents.py @@ -430,6 +430,9 @@ def source_scan_helper(source_id): ''' This function runs in a subprocess. ''' - scanner = SourceContentsScanner(source_id) - scanner.scan() + try: + scanner = SourceContentsScanner(source_id) + scanner.scan() + except Exception, e: + print e -- 2.39.2