From: Ansgar Burchardt Date: Tue, 18 Dec 2012 15:37:36 +0000 (+0100) Subject: daklib/archive.py: don't fail in prepare() if the .dsc is invalid X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fd24759c7d4d1c5c0398fb0bc775ca0d77a9310;p=dak 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. --- 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)