]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Merge from otavio
[dak.git] / daklib / queue.py
old mode 100644 (file)
new mode 100755 (executable)
index 058bef8..1247819
@@ -22,6 +22,7 @@
 import cPickle, errno, os, pg, re, stat, sys, time
 import apt_inst, apt_pkg
 import utils, database
+from dak_exceptions import *
 
 from types import *
 
@@ -128,7 +129,7 @@ def check_valid(new):
         new[pkg]["priority id"] = database.get_priority_id(new[pkg]["priority"])
         # Sanity checks
         di = section.find("debian-installer") != -1
-        if (di and file_type != "udeb") or (not di and file_type == "udeb"):
+        if (di and file_type not in ("udeb", "dsc")) or (not di and file_type == "udeb"):
             new[pkg]["section id"] = -1
         if (priority == "source" and file_type != "dsc") or \
            (priority != "source" and file_type == "dsc"):
@@ -615,7 +616,7 @@ distribution."""
                     morgue_file = os.path.join(Cnf["Dir::Morgue"],Cnf["Dir::MorgueReject"],file_entry)
                     try:
                         morgue_file = utils.find_next_free(morgue_file)
-                    except utils.tried_too_hard_exc:
+                    except NoFreeFilenameError:
                         # Something's either gone badly Pete Tong, or
                         # someone is trying to exploit us.
                         utils.warn("**WARNING** failed to move %s from the reject directory to the morgue." % (file_entry))