]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Add get_format_from_string utility method
[dak.git] / daklib / queue.py
index a6b6e7fbb10654801876337125940ec5462e5702..c30aeb0566853c6de967416fe8049a1d9bd71936 100755 (executable)
@@ -1208,7 +1208,7 @@ class Upload(object):
             return
 
         cnf = Config()
-        tagfile = cnf("Dinstall::LintianTags")
+        tagfile = cnf["Dinstall::LintianTags"]
         # Parse the yaml file
         sourcefile = file(tagfile, 'r')
         sourcecontent = sourcefile.read()
@@ -1237,13 +1237,12 @@ class Upload(object):
         # So now we should look at running lintian at the .changes file, capturing output
         # to then parse it.
         command = "lintian --show-overrides --tags-from-file %s %s" % (temp_filename, self.pkg.changes_file)
-        (result, output) = commands.getstatusoutput(cmd)
+        (result, output) = commands.getstatusoutput(command)
         # We are done with lintian, remove our tempfile
         os.unlink(temp_filename)
-        if (result != 0):
-            self.rejects.append("lintian failed for %s [return code: %s]." % (self.pkg.changes_file, result))
-            self.rejects.append(utils.prefix_multi_line_string(output, " [possible output:] "))
-            return
+        if (result == 2):
+            utils.warn("lintian failed for %s [return code: %s]." % (self.pkg.changes_file, result))
+            utils.warn(utils.prefix_multi_line_string(output, " [possible output:] "))
 
         if len(output) == 0:
             return
@@ -1734,7 +1733,7 @@ distribution."""
         # <Ganneff> yes
 
         # This routine returns None on success or an error on failure
-        res = get_queue('accepted').autobuild_upload(self.pkg, cnf["Dir::Queue::Accepted"])
+        res = get_or_set_queue('accepted').autobuild_upload(self.pkg, cnf["Dir::Queue::Accepted"])
         if res:
             utils.fubar(res)