]> git.decadent.org.uk Git - dak.git/commitdiff
Make process_new check if a directory is defined in config before trying to use it
authorJoerg Jaspert <joerg@debian.org>
Fri, 2 May 2008 12:21:56 +0000 (14:21 +0200)
committerJoerg Jaspert <joerg@debian.org>
Fri, 2 May 2008 12:21:56 +0000 (14:21 +0200)
ChangeLog
dak/process_new.py

index 397994fd2d85537fcaec7738a76fe4707fdfcc3d..4858294affed09856c2182de7c3986470568de34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-02  Joerg Jaspert  <joerg@debian.org>
+
+       * dak/process_new.py (recheck): Make the path check more robust,
+       so we no longer have to keep process_new seperate trees between
+       security and normal archive.
+
 2008-04-27  Joerg Jaspert  <joerg@debian.org>
 
        * dak/process_accepted.py (Urgency_Log.__init__): Warn if the
index 085e0913117277a7ffe72ba86b9c19b04b0ba690..0ae5307341d9c499db326a045d6541815415497b 100755 (executable)
@@ -85,10 +85,11 @@ def recheck():
                 dsc_filename = "%s_%s.dsc" % (source_package, source_epochless_version)
                found = 0
                for q in ["Accepted", "Embargoed", "Unembargoed"]:
-                    if os.path.exists(Cnf["Dir::Queue::%s" % (q)] + '/' + dsc_filename):
-                       found = 1
+            if Cnf.has_key(Cnf["Dir::Queue::%s" % (q)]):
+                if os.path.exists(Cnf["Dir::Queue::%s" % (q)] + '/' + dsc_filename):
+                    found = 1
                if not found:
-                    reject("no source found for %s %s (%s)." % (source_package, source_version, file))
+            reject("no source found for %s %s (%s)." % (source_package, source_version, file))
 
         # Version and file overwrite checks
         if files[file]["type"] == "deb":
@@ -816,7 +817,7 @@ def do_accept():
            # Check for override disparities
            Upload.Subst["__SUMMARY__"] = summary
        else:
-            Upload.accept(summary, short_summary)
+        Upload.accept(summary, short_summary)
         os.unlink(Upload.pkg.changes_file[:-8]+".dak")
        os.unlink(Cnf["Process-New::AcceptedLockFile"])