From ecd2ca44852b942c1af7cf1d9906c6bab8159fc1 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Fri, 11 Mar 2011 23:13:28 +0100 Subject: [PATCH] Handle empty packages in 'dak contents scan'. Signed-off-by: Torsten Werner --- daklib/contents.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daklib/contents.py b/daklib/contents.py index 056da53f..4a6330f8 100755 --- a/daklib/contents.py +++ b/daklib/contents.py @@ -252,8 +252,12 @@ class ContentsScanner(object): ''' session = DBConn().session() binary = session.query(DBBinary).get(self.binary_id) + empty_package = True for filename in binary.scan_contents(): binary.contents.append(BinContents(file = filename)) + empty_package = False + if empty_package: + binary.contents.append(BinContents(file = 'EMPTY_PACKAGE')) try: session.commit() except IntegrityError: -- 2.39.5