From 0fd24759c7d4d1c5c0398fb0bc775ca0d77a9310 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Tue, 18 Dec 2012 16:37:36 +0100 Subject: [PATCH] daklib/archive.py: don't fail in prepare() if the .dsc is invalid We only need the .dsc here to try and grab any files not included in the upload. If there is an error loading the .dsc, do not throw an exception here, but do so later instead. --- daklib/archive.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/daklib/archive.py b/daklib/archive.py index ca58da87..806ba402 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -652,7 +652,13 @@ class ArchiveUpload(object): continue fs.copy(src, dst, mode=0o640) - source = self.changes.source + source = None + try: + source = self.changes.source + except Exception: + # Do not raise an exception here if the .dsc is invalid. + pass + if source is not None: for f in source.files.itervalues(): src = os.path.join(self.original_directory, f.filename) -- 2.39.2