]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/archive.py
daklib/archive.py: don't fail in prepare() if the .dsc is invalid
[dak.git] / daklib / archive.py
index 6a424cdfdc08a91632daff29bc2785d8d7a637bf..806ba40211b82d31ee6840aa8e8e48e9c6875436 100644 (file)
@@ -86,7 +86,7 @@ class ArchiveTransaction(object):
         Will not give an error when the file is already present.
 
         @rtype:  L{daklib.dbconn.PoolFile}
-        @return: batabase object for the new file
+        @return: database object for the new file
         """
         session = self.session
 
@@ -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)