]> git.decadent.org.uk Git - dak.git/blobdiff - dak/control_suite.py
Check brit_file value, it can be None
[dak.git] / dak / control_suite.py
index 9eb8ae22ce379f6465d04a940ff2449a112606e1..fcd4ca39562cf0c96e61f2364dc3e412a1b01ed0 100755 (executable)
@@ -99,6 +99,16 @@ def britney_changelog(packages, suite, session):
     old = {}
     current = {}
 
+    try:
+        q = session.execute("SELECT changelog FROM suite WHERE id = :suiteid", \
+                            {'suiteid': suite.suite_id})
+        brit_file = q.fetchone()[0]
+    except:
+        brit_file = None
+
+    if not brit_file:
+        return
+
     q = session.execute("""SELECT s.source, s.version, sa.id
                              FROM source s, src_associations sa
                             WHERE sa.suite = :suiteid
@@ -129,7 +139,7 @@ def britney_changelog(packages, suite, session):
     q = session.execute(query)
 
     pu = None
-    brit = utils.open_file(Config()["Changelogs::Britney"], 'w')
+    brit = utils.open_file(brit_file, 'w')
 
     for u in q:
         if pu and pu != u[0]: