Fix release script in case there is no fixed bugs
authorXavier Claessens <xclaesse@gmail.com>
Tue, 10 Mar 2009 11:13:16 +0000 (11:13 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 10 Mar 2009 11:13:16 +0000 (11:13 +0000)
From: Xavier Claessens <xclaesse@gmail.com>

svn path=/trunk/; revision=2664

release.py

index 940072a89db9b1e6df57339f02b9c10a8d46926d..e9462962697505a53bed31c5a21ef56e486c8c99 100755 (executable)
@@ -241,7 +241,8 @@ class Project:
                                        message += '\n'
                                message += msg
 
-               self.query_bug_commits ()
+               if len (self.bug_commits) > 0:
+                       self.query_bug_commits ()
 
        def make_tag(self):
                new_tag = self.package_name.upper() + '_' +\
@@ -256,8 +257,13 @@ class Project:
 
        def generate_news(self):
                self.get_commits()
-               news = 'NEW in '+ self.package_version + '\n==============\n' 
-               news += self.commits + '\nBugs fixed:\n' + self.bugs + '\nTranslations:\n' + self.translations + '\n'
+               news = 'NEW in '+ self.package_version + '\n==============\n'
+               if self.commits != '':
+                       news += self.commits + '\n'
+               if self.bugs != '':
+                       news += 'Bugs fixed:\n' + self.bugs + '\n'
+               if self.translations != '':
+                       news += 'Translations:\n' + self.translations + '\n'
 
                return news