]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Check suite from database, not config file
[dak.git] / daklib / queue.py
index c7785adeb0ac81ec1bf133c5e322e3e1d2ada758..a8ea3035df38102937f0f6b32720c5c43fa05272 100755 (executable)
@@ -700,7 +700,7 @@ class Upload(object):
 
         # Ensure target distributions exist
         for suite in self.pkg.changes["distribution"].keys():
-            if not Cnf.has_key("Suite::%s" % (suite)):
+            if not get_suite(suite.lower()):
                 self.rejects.append("Unknown distribution `%s'." % (suite))
 
     ###########################################################################
@@ -961,8 +961,7 @@ class Upload(object):
                 entry["component"] = dest
 
         # Ensure the component is valid for the target suite
-        if cnf.has_key("Suite:%s::Components" % (suite)) and \
-           entry["component"] not in cnf.ValueList("Suite::%s::Components" % (suite)):
+        if entry["component"] not in get_component_names(session):
             self.rejects.append("unknown component `%s' for suite `%s'." % (entry["component"], suite))
             return